Hi, you can reference a worksheet using
Where sheet2 is the tab name![]()
Sheets("Sheet2")
or
Where 2 is the index, or position of the sheet in the worksheet![]()
Sheets(2)
or
Where Sheet2 is the name of the vba object of the worksheet (in the project tree)![]()
Sheet2
So using the first method:
![]()
Macro_show_data() Sheets("Sheet2").ShowAllData End Sub
Bookmarks