How to reference an unopened worksheet

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

Guest

Hello

How do I refer to an unopened Excel worksheet in VBA?

This is what I require. I have written some VBA code to display a MsgBox
when a certain event occurs. I want the MsgBox to display the value in cell
A1. So if I am using Workbook1 and a certain event occurs, I want a MsgBox to
appear displaying the value in cell A1 of workbook2.

I can do this so long as workbook2 is open. How do i get the MsgBox to
appear when I have only workbook1 open and not workbook2. What is the syntax
for specifying a filepath? The Excel I want to refer to is in a folder on my
Desktop.

Is this possible. Any help always welcome.

Regards

Alex
 
Back
Top