Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have written a macro to retrieve a specific text file from our network and
import it into excel and perform several functions. The scenario has changed so now the users need to select from several network files, so to systematically "point" to the one file no longer meets the need. So, can anyone tell me how to utilize an inputbox, with hopefully some sort of elipse, so the user can begin the macro to display the input box, via an elipse, locate/point to the text file and then inport the file via the valued input box? (it's the input box part I really need help with, since the code already exist to import and sort the text file data). Any and all help will be greatly appreciated. Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
fname = Application.GetOpenFileName()
Will display the file=Open dialog and allow the user to navigate and select a file. The fully qualified name of the file (name and path) are returned to the variable fname (as shown above - the file is not opened) and you can use that variable to pass the name to the code that does open and process the file. See help on GetOpenFileName for additional arguments and options. If you want to start in a specific directory, before showing the dialog, use chdrive and chdir to make the start directory the default. -- Regards, Tom Ogilvy "MWS" wrote in message ... I have written a macro to retrieve a specific text file from our network and import it into excel and perform several functions. The scenario has changed so now the users need to select from several network files, so to systematically "point" to the one file no longer meets the need. So, can anyone tell me how to utilize an inputbox, with hopefully some sort of elipse, so the user can begin the macro to display the input box, via an elipse, locate/point to the text file and then inport the file via the valued input box? (it's the input box part I really need help with, since the code already exist to import and sort the text file data). Any and all help will be greatly appreciated. Thanks in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank You Tom - I will try your suggestion.
"Tom Ogilvy" wrote: fname = Application.GetOpenFileName() Will display the file=Open dialog and allow the user to navigate and select a file. The fully qualified name of the file (name and path) are returned to the variable fname (as shown above - the file is not opened) and you can use that variable to pass the name to the code that does open and process the file. See help on GetOpenFileName for additional arguments and options. If you want to start in a specific directory, before showing the dialog, use chdrive and chdir to make the start directory the default. -- Regards, Tom Ogilvy "MWS" wrote in message ... I have written a macro to retrieve a specific text file from our network and import it into excel and perform several functions. The scenario has changed so now the users need to select from several network files, so to systematically "point" to the one file no longer meets the need. So, can anyone tell me how to utilize an inputbox, with hopefully some sort of elipse, so the user can begin the macro to display the input box, via an elipse, locate/point to the text file and then inport the file via the valued input box? (it's the input box part I really need help with, since the code already exist to import and sort the text file data). Any and all help will be greatly appreciated. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF | Excel Worksheet Functions | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |