Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I'm trying to set up some code where I choose the general file path directory at the start (via folderpicker or something), set as a variable, then be able to reference that variable throughout my code. It's a network location, I'm not sure if that changes things.
Here is an example: Code:
' Sub Path_Name() ' Dim FolderName As Long ' With Application.FileDialog(msoFileDialogFolderPicker) ' .Show ' On Error Resume Next ' FolderName = .SelectedItems(1) ' Err.Clear ' On Error GoTo 0 'End With ' End Sub I want to set that path to the variable "FolderName" And then I want to reference that variable in the remainder of my code, so if I want to reference the folder "Switchfoot", located in 09.27.12, in another sub procedure, I just need to call FolderName & "Switchfoot" I don't want to have to pick the folder again, I just want it to automatically look in that path for Switchfoot. Any help is appreciated! Last edited by KeriM : September 27th 12 at 04:11 PM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove end folder from path found with ThisWorkbook.Path command ? | Excel Programming | |||
Relative Path to a Folder | Excel Discussion (Misc queries) | |||
How to List the names of the subfolders present in the folder (path of folder is given in the textbox by user ) | Excel Programming | |||
Path of template folder | Excel Programming | |||
Get Folder Path | Excel Programming |