RJSIGKITS
Board Regular
- Joined
- Apr 15, 2013
- Messages
- 109
I'm trying to create a button that opens a specific folder path, dependant on the value in a cell on a specific workbook...
So, I have my file path, which I will use as 'Dim name1 As String', which is easy enough, but I want to include the value of the cell on the end of that to open a specific folder which has the same name as that cells value...
It's sort of like, I have folders named by clients surname+phone number (eg, SMITH289082) so, to find it, we would type SMITH289082 into the cell, then click the button to open the folder named 'SMITH289082'.
Should be simple enough..
So far I've got:
Please help - cheers!
So, I have my file path, which I will use as 'Dim name1 As String', which is easy enough, but I want to include the value of the cell on the end of that to open a specific folder which has the same name as that cells value...
It's sort of like, I have folders named by clients surname+phone number (eg, SMITH289082) so, to find it, we would type SMITH289082 into the cell, then click the button to open the folder named 'SMITH289082'.
Should be simple enough..
So far I've got:
Code:
Private Sub CommandButton18_Click()Dim name1 As String
Dim client1 As String
name1 = "C:\Users\Richard\Box Sync\Default Sync Folder\1. *******s\2 CLIENTS\"
Call Shell("explorer.exe " & name1, vbNormalFocus)
End Sub
Please help - cheers!