I was wondering if someone could advice me on the following issues
I have declared
Code: Select all
Public QuickTenderName(7) As String = Null
Public QuickTenderValue(7) As String = Null
Code: Select all
Public QuickTenderName(7) As String = Null
Public QuickTenderValue(7) As String = Null
Public QuickTenderName[7] As String
Public QuickTenderValue[7] As String
should work ... maybe better:Public QuickTenderName as String[]
Public QuickTenderValue as String[]
public/privat sub/function()
dim QuickTenderName as New string[]
dim QuickTenderValue as New string[]
...
...
QuickTenderName.add("stringname")
QuickTendervalue.add("stringvalue")
...
...
end
Private [or Public] QuickTenderName As New String[7]
Public Sub Main()
QuickTenderName[0] = "abcde"
...and so on...
Similarly with a local variable:
Public Sub Main()
Dim QuickTenderName As New String[7]
QuickTenderName[0] = "abcde"
...and so on...
Public QuickTenderName As New String[7] 'Not Public QuickTenderName(7) As String
I use the following so that I can use '.Add()' to fill the array: -Public QuickTenderName As New String[]
sDir As String[] = Dir(User.Home)
sNames As String[] = ["Alan","Sally","John","Ann"]
Note that the word Public is only needed if you intend to call this variable from another class.