Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
inputbox vs. userform/combobox vs. Windows file handlers ???
Hi All:
I need to prompt the user for the name of a secondary workbook, and then given that "other" filename, use it to replace a "place-holder" filename in some formulas. I can do all the search/replace in VBA, and if need by I can use an INPUTBOX to have the user enter the secondary filename (meaning either they type it in or copy it from the clipboard). What would be nice (since filenames are looooong), however, is if I could present the user w/ some dialboge box that displays all possible XLS files (having drilled down to some directory, etc.) and then have the user simply highlight the desired file and presss OK (or something like that), thus capturing the filename as a VBA variable. Can that be done easily, or will I have to use standard Window file diaglogue boxes, etc. and would that mean that the secondary file simply gets opened vs. capturing its filename as a VBA variable? Hope the above is clear, Any help/advice would be much obliged. Regards |
#2
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
inputbox vs. userform/combobox vs. Windows file handlers ???
List,
Take a look at the GetOpenFilename method in VBA. It presents the file open dialog box, and the user can select, but it doesn't open it, just returns the selected filename (full path). -- HTH RP "List Lurker" wrote in message . .. Hi All: I need to prompt the user for the name of a secondary workbook, and then given that "other" filename, use it to replace a "place-holder" filename in some formulas. I can do all the search/replace in VBA, and if need by I can use an INPUTBOX to have the user enter the secondary filename (meaning either they type it in or copy it from the clipboard). What would be nice (since filenames are looooong), however, is if I could present the user w/ some dialboge box that displays all possible XLS files (having drilled down to some directory, etc.) and then have the user simply highlight the desired file and presss OK (or something like that), thus capturing the filename as a VBA variable. Can that be done easily, or will I have to use standard Window file diaglogue boxes, etc. and would that mean that the secondary file simply gets opened vs. capturing its filename as a VBA variable? Hope the above is clear, Any help/advice would be much obliged. Regards |
#3
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
inputbox vs. userform/combobox vs. Windows file handlers ???
if the formulas are linked to external files...
you just have to change the links. see workbook objects' LinkSources & ChangeLink Methods to manipulate those. keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Bob Phillips" wrote: List, Take a look at the GetOpenFilename method in VBA. It presents the file open dialog box, and the user can select, but it doesn't open it, just returns the selected filename (full path). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Value From ComboBox On UserForm | Excel Discussion (Misc queries) | |||
ComboBox on UserForm | Excel Programming | |||
ComboBox on UserForm | Excel Programming | |||
Switching from InputBox to UserForm? | Excel Programming | |||
Inputbox or UserForm | Excel Programming |