Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
How can I get a dialog box to open in a certain location using VBA?
My problem happens when users press a button to automatically insert data from a separate file - if they have been doing things using a different path then Excel cannot find the data file. Is there an easy way around this using Activeworkbook.Path or something? The data file is located in the same directory as the main file. (I know this group is called worksheet.functions but have found this group very helpful in the past so please turn a blind eye to my OTness.) TIA, R. |
#2
![]() |
|||
|
|||
![]()
Hi R
Sub test() Dim F As Variant ChDrive ThisWorkbook.Path ChDir ThisWorkbook.Path F = Application.GetOpenFilename _ ("Good stuff (*.xls), *.xls") If F < False Then MsgBox CStr(F) End Sub HTH. Best wishes Harald "Mike Echo" skrev i melding ne.net.au... How can I get a dialog box to open in a certain location using VBA? My problem happens when users press a button to automatically insert data from a separate file - if they have been doing things using a different path then Excel cannot find the data file. Is there an easy way around this using Activeworkbook.Path or something? The data file is located in the same directory as the main file. (I know this group is called worksheet.functions but have found this group very helpful in the past so please turn a blind eye to my OTness.) TIA, R. |
#3
![]() |
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|