Greetings,
This code works fine: Sheet2.Cells(row, column) = 100
However, depending upon other factors, I will want to enter 100 in Sheet4 or Sheet5 or Sheet6, etc., and not Sheet2. So how do I use variables with my CodeNames?
This didn't work:
x = 4
Sheet(x).Cells(row, column) = 100
Nor did this:
ws_name$ = Sheet4.Name
WorkSheets(ws_name$).Cells(row, column) = 100
Nor did this:
ws_name$ = Sheet4.Name
Sheets(ws_name$).Cells(row, column) = 100
I can't for the life of me figure out the proper syntax.
Bookmarks