This one may be easy but I'm having trouble finding the solution in the archive/help files because so many irrelavent results come up.
I want to make a worksheet active. I know how to do this ordinarily but the catch is that I can't refer to it by name because the name changes with each project. My project should start off with a single worksheet then add two more worksheets and then select the original one again. My script is this:
Any input is appreciated!
Thanks,
Steve
I want to make a worksheet active. I know how to do this ordinarily but the catch is that I can't refer to it by name because the name changes with each project. My project should start off with a single worksheet then add two more worksheets and then select the original one again. My script is this:
Code:
Sub Program()
Dim cell As Range
Dim aRange As Range
Set aRange = Range(Range("I2"), Range("I65536").End(xlUp))
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "sheetx"
Sheets.Add
Sheets("Sheet2").Select
Sheets("Sheet2").Name = "sheety"
Selection.AutoFilter (This is where I want to autofilter my original page but can't refer to it by name)
Any input is appreciated!
Thanks,
Steve