rlcurlee67
New Member
- Joined
- Jun 1, 2022
- Messages
- 11
- Office Version
- 2013
- Platform
- Windows
I have a macro in my Excel file that is working, but not correctly. It will open the last file path I went to.
What is wrong with my code? I want it to open that file path below and let me chose the file.
What would be ideal is if it had a message box and I could type in the filename.
Sub test()
Dim myFile As String
Dim YourFolderPath As Variant
YourFolderPath = "X:\UTCS\Region\USA\Assets\GOM_DEV\Julia\SubSrfc\Rsvr_Mgmt-Surv\Surv-Data\Prod\St. Malo Morning Report - by Prod Date\2022"
myFile = Application.GetOpenFilename
If myFile = "False" Then Exit Sub
'MsgBox myFile
End Sub
What is wrong with my code? I want it to open that file path below and let me chose the file.
What would be ideal is if it had a message box and I could type in the filename.
Sub test()
Dim myFile As String
Dim YourFolderPath As Variant
YourFolderPath = "X:\UTCS\Region\USA\Assets\GOM_DEV\Julia\SubSrfc\Rsvr_Mgmt-Surv\Surv-Data\Prod\St. Malo Morning Report - by Prod Date\2022"
myFile = Application.GetOpenFilename
If myFile = "False" Then Exit Sub
'MsgBox myFile
End Sub
Last edited by a moderator: