longbow2000
Board Regular
- Joined
- May 5, 2004
- Messages
- 59
- Office Version
- 365
- Platform
- Windows
Good Day
I want to declare various strings, i.e., Str1 As String, St2, As String up to specific number , Str As String
In my code I count the number of cells with value in it:
nrLinks = WorksheetFunction.CountA(ws.Columns(1))
'Using the returned value in a loop function to obtain details, then I would like to assign a StringName:
For i = 1 To nrLinks
wsTemp.Cells(i, 1) = Left(ws.Cells(i, 1), (Application.WorksheetFunction.Find("_", ws.Cells(i, 1), 1) - 1))
Dim “Str” & i As String (or Dim Str + i As String)? (not sure about correct coding)
Set "Str" & i As wsTemp.Cells(i, 1) ? (not sure about correct coding)
Next i
' Use Str1, Str2, to last Str later in code
Thanks in advance
I want to declare various strings, i.e., Str1 As String, St2, As String up to specific number , Str As String
In my code I count the number of cells with value in it:
nrLinks = WorksheetFunction.CountA(ws.Columns(1))
'Using the returned value in a loop function to obtain details, then I would like to assign a StringName:
For i = 1 To nrLinks
wsTemp.Cells(i, 1) = Left(ws.Cells(i, 1), (Application.WorksheetFunction.Find("_", ws.Cells(i, 1), 1) - 1))
Dim “Str” & i As String (or Dim Str + i As String)? (not sure about correct coding)
Set "Str" & i As wsTemp.Cells(i, 1) ? (not sure about correct coding)
Next i
' Use Str1, Str2, to last Str later in code
Thanks in advance