vba multiple dim
Dim a, b As Integer
' is equivalent to
Dim a As Variant, b As Integer
' Declare a and b as Integer:
Dim a As Integer
Dim b As Integer
' Or:
Dim a As Integer, b As Integer
vba multiple dim
Dim a, b As Integer
' is equivalent to
Dim a As Variant, b As Integer
' Declare a and b as Integer:
Dim a As Integer
Dim b As Integer
' Or:
Dim a As Integer, b As Integer
vba multidimensional array
Sub CreatingArrays()
'Declarating
Dim arrVar(0 to 3, 0 to 5) As Variant 'Creating an array of 4x6 dimensions
Dim strArr(3,5) As String 'Creating an string array of 4x6 dimensions
'Contro Variables
Dim i As Integer
Dim j As Integer
Dim intCount as Integer
'Fulling up Arrays
For i = LBound(arrVar) To UBound(arrVar)
For j = LBound(arrVar, 2) To UBound(arrVar, 2)
arrVar(i, j) = intCount
arrStr(i, j) = "X, Y: " & i & ", " & j
intCount = intCount + 1
Next j
Next i
End Sub
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us