Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Different Path Selection

Hi,

I would like to open a file but the path name should be given in the
input box

fox example:


Workbooks.Open Filename:="\\10.10.10.4\x\y\z\a\PRODUCTION REPORT.xls"

here a should be the input message.

Can any one hlep

Thanks
Sam

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Different Path Selection

application.getopenfilename

Tim


"sam" wrote in message
oups.com...
Hi,

I would like to open a file but the path name should be given in the
input box

fox example:


Workbooks.Open Filename:="\\10.10.10.4\x\y\z\a\PRODUCTION REPORT.xls"

here a should be the input message.

Can any one hlep

Thanks
Sam



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Different Path Selection

Hi Tim,

But in this function i cannot give the input?

Please show me the code

Thank you,
Sunil

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Different Path Selection

Snippet from VBA Help:

fileToOpen = Application _
.GetOpenFilename("Text Files (*.txt), *.txt")
If fileToOpen < False Then
MsgBox "Open " & fileToOpen
End IfHTH--AP"sam" a écrit dans le message de
oups.com...
Hi Tim,

But in this function i cannot give the input?

Please show me the code

Thank you,
Sunil



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Different Path Selection

Hi,

The following is taken from a macro that I use to save to a pre-determined
location.


Dim Fname, Suggested, Hdr, Fs, Res
Suggested = ThisWorkbook.Path & "\" & "Schedules " & Format(Date, "dd mmm
yy")
Hdr = "Please choose a Destination and a Name for your file, then click
Save."
GetFname:
Fname = Application.GetSaveAsFilename(Suggested, fileFilter:="Excel File
(*.xls), *.xls)", Title:=Hdr)
.. . . . . .

'Suggested' is the path that appears as 'default'.. It can be whatever you
want.

Don



"sam" wrote in message
oups.com...
Hi Tim,

But in this function i cannot give the input?

Please show me the code

Thank you,
Sunil





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Different Path Selection

Hi,

I have to collect the data from a path whether the path should be given
in inputbox and i have to process few datas

thank You,
Sam

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Different Path Selection

Then why not just use an inputbox ? There is plenty of info in Help on
this.

--
Tim Williams
Palo Alto, CA


"sam" wrote in message
oups.com...
Hi,

I have to collect the data from a path whether the path should be given
in inputbox and i have to process few datas

thank You,
Sam



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Different Path Selection

sam,
It seems I'm not the only one confused by what you want.
If you want the user to select a file, then open that file, use
Application.GetOpenname.
(You could use an input box, but why, when you have better alternative.)

If the user has no choice, then why display anything ?

NickHK

"sam" wrote in message
oups.com...
Hi,

I would like to open a file but the path name should be given in the
input box

fox example:


Workbooks.Open Filename:="\\10.10.10.4\x\y\z\a\PRODUCTION REPORT.xls"

here a should be the input message.

Can any one hlep

Thanks
Sam



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
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
hyperlink navigation path path wrong in Excel 2003 CE Admin Excel Discussion (Misc queries) 5 January 7th 06 07:47 PM
how to change absolute path to relative path hwijgerse Excel Worksheet Functions 0 November 25th 05 07:18 AM
Current path to Qualified Path Mary Excel Programming 1 October 14th 04 02:42 PM


All times are GMT +1. The time now is 07:19 AM.

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"