Have you declared "y" as anything?
Have you declared "y" as anything?
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
I don't know, it was someone else's proposed code change earlier on in the thread. Based on your question, it's doubtful. I don't know what the answer is as to specifically what it should be declared as.
Top of sheet code
Original codeOption Explicit Public arr As Variant Public strAddress As String
Suggested, amended to match original? Doesn't work.Public Sub ProcessTab() Dim i As Integer If Len(strAddress) <> 0 Then For i = 0 To UBound(arr) If arr(i) = Split(strAddress, ":")(0) Then If i = UBound(arr) Then i = 0 Else i = i + 1 End If Exit For End If Next ActiveSheet.Range(arr(i)).Select Else strAddress = arr(0) 'End If 'End Sub
Public Sub ProcessTab() Dim y As Integer If strAddress <> "" Then y = Application.Match(Split(strAddress, ":")(0), arr, 0) Range(arr(y)).Select End If End Sub
Last edited by MSXL; 09-07-2022 at 04:10 AM.