How to "Set alias for worksheet in other excel file"

  • Thread starter Thread starter davidc
  • Start date Start date
D

davidc

set ws1 = worksheet("sheet1")
this is used to set alias for the local worksheet
But how to set alias for worksheet located in other excel
file?
 
Hi
one way:
...
Dim wbk as workbook
Dim wks as worksheet
set wbk = workbooks("other workbook.xls")
set wks = wbk.worksheets("sheet1")
....
 
Back
Top