Hi, I am trying to open a browse files window and select a file saving it to a string. I have tried a lot of different methods, but nmothing is working. Here is my recent code that I have tried.
Dim fd As FileDialog, myDir As String
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.Title = "Choose a folder"
myDir = CurDir
If .Show = -1 Then myDir = fd.SelectedItems(1)
End With
MsgBox myDir
Set fd = Nothing
thats it not exactly what I want, but when ever I run my code I get an error that says: can't find project or library
If anyone knows the answer to this problem I would greatly appreciate it thank you.
-ATray
Dim fd As FileDialog, myDir As String
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.Title = "Choose a folder"
myDir = CurDir
If .Show = -1 Then myDir = fd.SelectedItems(1)
End With
MsgBox myDir
Set fd = Nothing
thats it not exactly what I want, but when ever I run my code I get an error that says: can't find project or library
If anyone knows the answer to this problem I would greatly appreciate it thank you.
-ATray