Open another WorkBook

  • Thread starter Thread starter JB
  • Start date Start date
you can use the GetOpenFileName() method -- read HELP on this as it is
quite useful


Dim FileToOpen As String
ChDrive "D" ' not required here. but enables you to get the dialog box
looking somewhere..

FileToOpen = Application.GetOpenFilename
 
If you mean to open other workbooks from the same path of the currently
opened file use...

Workbooks.Open ActiveWorkbook.Path & "\filename.xls"

If this post helps click Yes
 
Patrick, what I have going on is the user clicks button on the current
worksheet. The code will copy three numbers from that worksheet. Open the
other workbook (target) and pasts the data into that workbook. If the user
has moved the target workbook or has navigated away from the directory it is
in my code Workbooks.Open Filename:= "Target.xls" does not work because it
needs the path.
 

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