I am trying to code a VBA button where it will open a folder in windows explorer.
I can do it fine with the following code.
Sub Key_Register()
'
'
Dim Foldername As String
Foldername = "L:\KEY REGISTER\40025\"
Shell "C:\WINDOWS\explorer.exe """ & Foldername & "", vbNormalFocus
'
End Sub
The issue is, the location varies depending on the job number.
In the above case - it is Job 40025.
This number changes from job to job - it will always be numerical but not always 5 digits (it can be 6-digits).
I can put the job number in cell A1 where it will dynamically change.
How do I integrate this to the above code?
Bookmarks