Open Downloads Folder

kevinh2320

Board Regular
Joined
May 13, 2016
Messages
61
I'm looking for VBA code that will open Windows File Explorer at the Downloads folder. I have the code below that will open the Documents folder and I've been able to modify it to open other locations but, can't figure out how to open the Downloads folder.

Private Sub Command1_Click()

Dim Foldername As String
Foldername = "\\server\Instructions\"

Shell "C:\WINDOWS\explorer.exe """ & "Documents" & "", vbNormalFocus

End Sub

Thanks for any help.
 
Code:
Shell "C:\WINDOWS\explorer.exe %userprofile%\Downloads", vbNormalFocus

This isn't working for me either (while the same command at the run prompt does work: C:\WINDOWS\explorer.exe %userprofile%\Downloads)

I suggest you use the other method shown above. Or a temp folder instead of the downloads folder if that would fit. Or possibly the public downloads folder (not sure what your end goal is so these are just some other possibilities)
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You're welcome. I learned something in the process. Like many other things I manage to help with, it's probably not something I'll remember if I ever need it!
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top