O
Ogier
I would like to assign values to an array consisting of records with three
string fields:
Public Type Shortcut
strF1 As String
strF2 As String
strF3 As String
End Type
Dim GreekLetters(53) As Shortcut
Sub Assingments()
GreekLetters(1).strF1 = "1F1"
GreekLetters(1).strF2 = "1F2"
GreekLetters(1).strF3 = "1F3"
...
End Sub
Is it possible to shorten this? The following does *not* work, the compiler
expects a ")" at the first comma:
GreekLetters(1) = ("1F1","1F1","1F1")
I tried to change the record into an array, Dim GreekLetters(53,3) As
String, but this also gives a compiler error when using a one-line assignment.
Best wishes
Holger Nielsen
string fields:
Public Type Shortcut
strF1 As String
strF2 As String
strF3 As String
End Type
Dim GreekLetters(53) As Shortcut
Sub Assingments()
GreekLetters(1).strF1 = "1F1"
GreekLetters(1).strF2 = "1F2"
GreekLetters(1).strF3 = "1F3"
...
End Sub
Is it possible to shorten this? The following does *not* work, the compiler
expects a ")" at the first comma:
GreekLetters(1) = ("1F1","1F1","1F1")
I tried to change the record into an array, Dim GreekLetters(53,3) As
String, but this also gives a compiler error when using a one-line assignment.
Best wishes
Holger Nielsen