-
macro to open a folder with explorer
Hello,
I'm trying to create a Excel 2003 macro which will use vlookup to get the folder name to open with explorer (like a folder d:\123 for excample).
1. As a starting point I created a vlookup formula:
=+HYPERLINK(+VLOOKUP(F7,hyper,2))
2. Next luckily I googled to Open any file or application (author johnske) kb article in this forum.
But appears I can't figure out how to join my formula to it.
'<< OPEN ANYTHING >>
Sub OpenWindowsExplorer()
On Error GoTo 1
ActiveWorkbook.FollowHyperlink "C:\Windows\explorer.exe", NewWindow:=True
Exit Sub
1: MsgBox Err.Description
kb id=341
3. And what is missing in my vlookup formula - there must be a relative lefmost cell in the active row, instead of F7.
Is it possible to create such a macro?
Thanks.
Andres
-
How about Shell
[vba]
shell "explorer C:\"
[/vba]
-
Thanks for trying.
It's still a rather long way to the working macro :-), but perhaps it's better to start from formula, as this site has also rather restricted avilabilty and the content is displayed mostly MSIE users in mind ... :-(
As my macro writing skills are rather poor -
Is it possible in the formula below to replace fixed "F7" with active cell?
Or perhaps even more precisely - to replace F7 with leftmost cell in the present row?
=+HYPERLINK(+VLOOKUP(F7,hyper,2))
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules