Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JB JB is offline
external usenet poster
 
Posts: 115
Default Open another WorkBook

In excel VB for Apps how to open another workbook if the path is unknown
  #2   Report Post  
Posted to microsoft.public.excel.programming
r r is offline
external usenet poster
 
Posts: 125
Default Open another WorkBook

Function GetOpenFilename([FileFilter], [FilterIndex], [Title], [ButtonText],
[MultiSelect])
of Excel.Application

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"JB" wrote:

In excel VB for Apps how to open another workbook if the path is unknown

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Open another WorkBook

you can use the GetOpenFileName() method -- read HELP on this as it is
quite useful


Dim FileToOpen As String
ChDrive "D" ' not required here. but enables you to get the dialog box
looking somewhere..

FileToOpen = Application.GetOpenFilename



"JB" wrote in message
...
In excel VB for Apps how to open another workbook if the path is unknown


  #4   Report Post  
Posted to microsoft.public.excel.programming
JB JB is offline
external usenet poster
 
Posts: 115
Default Open another WorkBook

Patrick, what I have going on is the user clicks button on the current
worksheet. The code will copy three numbers from that worksheet. Open the
other workbook (target) and pasts the data into that workbook. If the user
has moved the target workbook or has navigated away from the directory it is
in my code Workbooks.Open Filename:= "Target.xls" does not work because it
needs the path.

"Patrick Molloy" wrote:

you can use the GetOpenFileName() method -- read HELP on this as it is
quite useful


Dim FileToOpen As String
ChDrive "D" ' not required here. but enables you to get the dialog box
looking somewhere..

FileToOpen = Application.GetOpenFilename



"JB" wrote in message
...
In excel VB for Apps how to open another workbook if the path is unknown



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Open another WorkBook

If you mean to open other workbooks from the same path of the currently
opened file use...

Workbooks.Open ActiveWorkbook.Path & "\filename.xls"

If this post helps click Yes
---------------
Jacob Skaria


"JB" wrote:

In excel VB for Apps how to open another workbook if the path is unknown



  #6   Report Post  
Posted to microsoft.public.excel.programming
JB JB is offline
external usenet poster
 
Posts: 115
Default Open another WorkBook

Worked like a charm. Sometimes you cannot see the trees for the forest.

"Jacob Skaria" wrote:

If you mean to open other workbooks from the same path of the currently
opened file use...

Workbooks.Open ActiveWorkbook.Path & "\filename.xls"

If this post helps click Yes
---------------
Jacob Skaria


"JB" wrote:

In excel VB for Apps how to open another workbook if the path is unknown

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 to: Open closed workbook/Search data tables/Return data to open workbook Hugh Adams Excel Discussion (Misc queries) 0 August 18th 10 02:04 PM
how do i open a data workbook when i open a timesheet workbook [email protected] uk Excel Discussion (Misc queries) 2 January 4th 09 04:50 PM
Open a specific workbook...find value from other open workbook and then insert cells values in cell next to it. [email protected] Excel Programming 1 May 13th 07 01:46 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
How do you program so that Workbook B cannot be open unless Workbook A is open? Plus I need to validation Marcello do Guzman[_3_] Excel Programming 2 December 5th 04 06:50 AM


All times are GMT +1. The time now is 06:50 PM.

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

About Us

"It's about Microsoft Excel"