Brian_in_Austin
New Member
- Joined
- Feb 26, 2016
- Messages
- 2
Hi,
I want to be open Windows Explorer and select (but not open) a specified file (like a show in folder command). The file is on a USB drive and I'm asking the user to enter the drive letter in a cell.
Cell D1: Drive Letter. Example: E
Cell E1: Folder: Example: \MyVideos\
And the activecell has the name of the file to search for.
I found this Shell command (below) from GlennFromIowa, and it works great. However, I want to use the values in cells D1 and E1 rather than the hardwired "D:\username\documents\workplans\" in the example. How would I change the Shell command?
Thanks!!!!
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Sub open_explorer()
Shell "C:\Windows\explorer.exe /select, D:\username\Documents\workplans\"& ActiveCell.Value, vbMaximizedFocus
EndSub</code>
I want to be open Windows Explorer and select (but not open) a specified file (like a show in folder command). The file is on a USB drive and I'm asking the user to enter the drive letter in a cell.
Cell D1: Drive Letter. Example: E
Cell E1: Folder: Example: \MyVideos\
And the activecell has the name of the file to search for.
I found this Shell command (below) from GlennFromIowa, and it works great. However, I want to use the values in cells D1 and E1 rather than the hardwired "D:\username\documents\workplans\" in the example. How would I change the Shell command?
Thanks!!!!
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;">Sub open_explorer()
Shell "C:\Windows\explorer.exe /select, D:\username\Documents\workplans\"& ActiveCell.Value, vbMaximizedFocus
EndSub</code>