- Excel VBA 質問スレ Part59
333 :デフォルトの名無しさん (ワッチョイ 5f2f-dPPD)[sage]:2019/02/19(火) 21:21:04.93 ID:eXSGnhOj0 - >>323
構造体でできなくはない VBAの構造体、制限多いけどな Public Type Rect Top As Integer: Left As Integer: Bottom As Integer: Right As Integer End Type Public Function CRect(Top As Integer, Left As Integer, Bottom As Integer, Right As Integer) As Rect Dim r As Rect r.Top = Top: r.Left = Left: r.Bottom = Bottom: r.Right = Right CRect = r End Function Public Function PtInRect(Rect As Rect, x As Integer, y As Integer) As Boolean If Rect.Left < x And Rect.Right > x And Rect.Top < y And Rect.Bottom > y Then PtInRect = True End If End Function Public Sub test() Dim r(10) As Rect r(1) = CRect(10, 10, 100, 100) '... If PtInRect(r(1), 15, 180) Then MsgBox "In Rect1" End If If PtInRect(CRect(10, 10, 100, 100), 15, 80) Then MsgBox "In Rect2" End If End Sub 改行多すぎらしいので:で詰めて書いてる
| - Excel VBA 質問スレ Part59
334 :デフォルトの名無しさん (ワッチョイ 5f2f-dPPD)[sage]:2019/02/19(火) 21:25:35.60 ID:eXSGnhOj0 - >>329
エクセルでCSV開いてシートをそのまま2次元配列に突っ込めば良いんじゃないか
| - ふらっと C#,C♯,C#(初心者用) Part141
866 :デフォルトの名無しさん (ワッチョイ 5f2f-dPPD)[sage]:2019/02/19(火) 21:39:52.76 ID:eXSGnhOj0 - >>865
C#で出来るの? どうやって?
|
|