Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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?
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
when opening an Excel Workbook, another blank workbook also opens Gord Dibben Excel Discussion (Misc queries) 0 October 12th 07 09:49 PM
excel VBA problem - setting workbook as variable & opening/re-opening safe Excel Programming 1 August 20th 04 12:22 AM
How to make the opening of a workbook conditional upon the opening of another workbook Marcello do Guzman Excel Programming 1 December 16th 03 06:09 AM
How to make opening of workbook conditional of opening of another workbook turk5555[_2_] Excel Programming 2 December 15th 03 11:07 PM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"