We help IT Professionals succeed at work.

VB in Xls: command to open specific folder in File manager

CandidKarlito
on
Hello!

Often, I work in an Excel sheet and should quickly find another *.xls  somewhere deeple buried in my thosends of folders. It woud be convenient just to run a macro which opens this specific folder.
What is the command to open a specific folder (so I can see the content) in a new Explorer Window (file manager)?

Thank you for your help!
Karl
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2011
Commented:

Dim strpath as string

Strpath = "c:\delete me\"
shell "c:\windows\explorer.exe """ & strpath & "", vbnormalfocus

Open in new window

CERTIFIED EXPERT
Top Expert 2011

Commented:
Meant to say replace the folder path with that which you require. Also maybe odd typos as I'm not on a pc currently but  think it's correct.

Chris

Author

Commented:
Spot on!
Thanky you very much, Chris, for this and your fast response!

Best regards
Karl

Explore More ContentExplore courses, solutions, and other research materials related to this topic.