Next statement to open the .xls

  • Thread starter Thread starter Donald
  • Start date Start date
D

Donald

strDirectory = "F:\$Visit\ " & x & "\" & strVisit & " " &
strVisitNumber & " " & strWorksheet & ".xls"

The strDirectory has in it F:\$Visit\12930 Keizer\Visit 4 Worksheet.xls
How do I get "Visit 4 Worksheet" to open on the desktop. What is my next
statement?
 
Workbooks.Open(strDirectory)

or

Dim wkbk As Excel.Workbook
Set wkbk = Workbooks.Open(strDirectory)

if you want a reference to the newly opened workbook.

--JP
 
Back
Top