ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening a Workbook within VB (https://www.excelbanter.com/excel-programming/407456-opening-workbook-within-vbulletin.html)

needyourhelp

Opening a Workbook within VB
 
Hi All,

I'm having a problem opening a file i VB.
VB seems to want the full path name and I just want it to look for the file
the is in the local folder that I'm running the VB from, but I don't know how
to do this.

I try: Workbooks.Open "test.xls"
&
VB wants: Workbooks.Open "C:\Folder\Test.xls"

Can I get around this?

Jim Cone

Opening a Workbook within VB
 
ThisWorkbook.Path & "\" & Test.xls
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"NeedYourHelp"
wrote in message
Hi All,
I'm having a problem opening a file i VB.
VB seems to want the full path name and I just want it to look for the file
the is in the local folder that I'm running the VB from, but I don't know how
to do this.

I try: Workbooks.Open "test.xls"
&
VB wants: Workbooks.Open "C:\Folder\Test.xls"

Can I get around this?


All times are GMT +1. The time now is 04:20 AM.

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