theman4392000
New Member
- Joined
- Apr 14, 2011
- Messages
- 2
I'm having a problem creating an excel vba code that creates a folder on the desktop and saves it under a name that I have on the excel sheet.
I have the code configured to work for my computer, but it won't work on others because the code reads:
Sheets("Folder Creator").Select
fnamepdf = Range("B8").Value
MkDir "C:\Users\Smith\Desktop\Roof Projects\" & fnamepdf
fnamepdf2 = "C:\Users\Smith\Desktop\Roof Projects\" & fnamepdf & "\" & fnamepdf & " Job Folder.pdf"
Not everyone is a Smith User. How can I change that so anyone can use the code and have it create a folder on their desktop, on their computer?
I have windows 7, but others may be using windows vista
I have the code configured to work for my computer, but it won't work on others because the code reads:
Sheets("Folder Creator").Select
fnamepdf = Range("B8").Value
MkDir "C:\Users\Smith\Desktop\Roof Projects\" & fnamepdf
fnamepdf2 = "C:\Users\Smith\Desktop\Roof Projects\" & fnamepdf & "\" & fnamepdf & " Job Folder.pdf"
Not everyone is a Smith User. How can I change that so anyone can use the code and have it create a folder on their desktop, on their computer?
I have windows 7, but others may be using windows vista