I am using vba in excel. I am trying to do the following seeing instr is not working I am writing my own program. Just I am having an issue with this
dynamic array.
here is a clip of my code
Expand|Select|Wrap|Line Numbers
- Dim mystring1() As String ' the serial number field
- Dim mystring2() As String 'the data field
- Dim searchfield As Integer, searchbyfield As Integer 'hold length of both fields
- searchfield = Len(searchable) 'get the length of the data string"
- searchbyfield = Len(searchby)'get the lenght of the serial number
- ReDim mystring1(searchbyfield) As String
- ***I get the followin error with the next line of code. "Can't assignt to array"
- searchby is a string past in from the main subroutine.****
- mystring1 = searchby
- ReDim mystring1(searchfield) As String
- mystring2 = searchable
Thanks