Open Folder from inputbox

P

Phil Floyd

I am trying to open a folder or a file from entering a partial folder name
in an Input box. The folders are always in the path: G:\Shared
Documents\Purchase Orders. All of the folders located are similar to the
following: 320063 Process Plus or 410009 American Building. In all cases
there is a 6 digit number preceding the name. How do I enter only the 6
digit number in the inputbox and have the Open dialog show with that folder
opened. This is as far as I have gotten.



ChDrive "G"
ChDir "G:\Shared Documents\Purchase Orders"
myFldr = Application.InputBox("Enter a folder or PO number")


Thanks,

Phil
 
M

mark

String together the first part of your directory as the
first argument in the method below:


Application.Dialogs(xlDialogOpen).Show ("c:\documents and
settings")


for you, it would be something like:

Application.Dialogs(xlDialogOpen).Show (myFlder & "NAME")

You could use a Select Case or If structure to assign
the "NAME" as a variable based upon the results of the
inputbox, if that's how your system works.
 
Top