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")
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top