Hello my problem is the following: I use to declare for example ws as worksheet and then set it to a specific worksheet. This way when I type the dot after ws I get suggestions for the methods that can be used.
Now I have a workbook with a lot of worksheet and I would like to be able to set each one of them to a different worksheet.
Do you think is it possible to achieve with a loop? thanks
I tried something like EDIT
Dim x as Worksheet
for i=1 to 50
x = "ws" & i
set x = thisworkbook.Sheets(i)
Next
But it does't work Thak you to everyone for your help
You can use an array for this:
Or this way:
Note that Sheets is the collection of all tabs(e.g. including charts), Worksheets just of spreadsheets