I have ordinary VBA code shown below. I'm only showing the code because it is just every day kind of stuff. It works on a specific sheet fine. I want to know how to have it run against which ever Tab/Sheet is in front.
I want the code to run on the active tab. Maybe its called the active sheet.
I tried searching the forum but I couldn't narrow it down.
Best and thank you,
Kevin
'Fill array with values. One letter per location.
For row = 2 To 300
rowContents = Cells(row, 1).Value
colContents = Cells(row, 2).Value
length = Cells(row, 3).Value
field = Cells(row, 4).Value
OutputText = Cells(row, 5).Value
'Truncate data according to length. Maybe it could change color on sheet as a warning.
OutputText = Mid(OutputText, 1, length)
For pos = 1 To Len(OutputText)
'Examine the current element in the array
I tried searching the board but too many results came back and I could not tell what I needed.
I want the code to run on the active tab. Maybe its called the active sheet.
I tried searching the forum but I couldn't narrow it down.
Best and thank you,
Kevin
'Fill array with values. One letter per location.
For row = 2 To 300
rowContents = Cells(row, 1).Value
colContents = Cells(row, 2).Value
length = Cells(row, 3).Value
field = Cells(row, 4).Value
OutputText = Cells(row, 5).Value
'Truncate data according to length. Maybe it could change color on sheet as a warning.
OutputText = Mid(OutputText, 1, length)
For pos = 1 To Len(OutputText)
'Examine the current element in the array
I tried searching the board but too many results came back and I could not tell what I needed.