ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Next statement to open the .xls (https://www.excelbanter.com/excel-programming/434909-next-statement-open-xls.html)

Donald

Next statement to open the .xls
 
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?

JP[_4_]

Next statement to open the .xls
 
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

On Oct 13, 4:16*pm, Donald wrote:
* * * * * *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?



All times are GMT +1. The time now is 03:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com