Opening a Workbook within VB

N

NeedYourHelp

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?
 
J

Jim Cone

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?
 

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

Top