Defining a range in a different open workbook from the active one

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to set a range in different workbook, PayRollCarryOver, from the
currently active one. PayRollCarryOver is open but not active.

What is the proper syntax for the link to another workbook?

I tried this, but got an error:

Set newCarryover = Range("[PayrollCarryOver.xls]'Carryover'!A1")

Thank you.

John Wirt
 
John,
Work you way through the Object Model:

Dim newCarryover as Range
Set newCarryover =
Workbooks("PayrollCarryOver.xls").Worksheets("Carryover").Range("A1")

NickHK
 

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