Hi All
I’m not a specialist to right a code in VBA. Please help me!
I have a form with two fields A and B. I created a button to open a specific Subfolder S (Sx until Sy) located in a specific Folder F (Fx until Fy).
Example: If the field A = F5 and the field B = S10, pressing on the button I have to open the Path: P:\F5\S10
I tried to use this code:
Dim strFoldername As String
Dim strSubfoldername As String
strFoldername = Me.A
strSubfoldername = Me.B
FollowHyperlink C:\strFoldername\strSubfoldername
Something is wrong and doesn’t work.
In the same time, if is possible, I like to add an If statement.
If the subfolder doesn’t exist then,
Msgbox confirmation, create the respective subfolder name and open it.
The something for the folder level:
Msgbox confirmation, create the respective folder name and open it.
Can you help me?
Thanks
I’m not a specialist to right a code in VBA. Please help me!
I have a form with two fields A and B. I created a button to open a specific Subfolder S (Sx until Sy) located in a specific Folder F (Fx until Fy).
Example: If the field A = F5 and the field B = S10, pressing on the button I have to open the Path: P:\F5\S10
I tried to use this code:
Dim strFoldername As String
Dim strSubfoldername As String
strFoldername = Me.A
strSubfoldername = Me.B
FollowHyperlink C:\strFoldername\strSubfoldername
Something is wrong and doesn’t work.
In the same time, if is possible, I like to add an If statement.
If the subfolder doesn’t exist then,
Msgbox confirmation, create the respective subfolder name and open it.
The something for the folder level:
Msgbox confirmation, create the respective folder name and open it.
Can you help me?
Thanks