Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In one of the tools I've created, users can opt to either open a
document or save it to their desktop ... some files are so big that they're only available as .zip files for download. In these cases, I'd like to offer the user an option -- after download, they can either stay in Excel or go to the folder containing the downloaded file ... but how to do that? I've pasted the current code below ... I've figured out how to open Windows Explorer to the proper folder, but I'd like to have Explorer become the top-most item on the DeskTop. I thought I could maybe do it with a SendKeys command (as shown below), but that didn't work as I thought .. Any ideas? Thanks in advance ... Ray ' some other code before this Select Case MsgBox("The selected File has been downloaded successfully ..." _ & vbCrLf & "" _ & vbCrLf & "Would you like to go that file now?" _ & vbCrLf & "YES ... to open the Portal Reports folder" _ & vbCrLf & " NO ... to view the download later" _ , vbYesNo Or vbExclamation Or vbDefaultButton1, "Download Complete!") Case vbYes Shell "explorer U:\Desktop\Portal Reports\" Application.SendKeys ("%{tab}") Exit Sub Case vbNo End Select ' ... other code (Error-handling) after this |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Answered my own question ... for the archive:
The Shell command should have read: Shell "explorer U:\Desktop\Portal Reports\" , vbNormalFocus This sends the specified Explorer window to the front. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Windows Explorer | Excel Programming | |||
How to activate (in the Project Explorer window) using VBA | Excel Discussion (Misc queries) | |||
Windows().Activate vs Workbooks().Activate | Excel Programming | |||
Windows Explorer maximizes over XL 2000, if opened w/ explorer | Excel Discussion (Misc queries) | |||
Use Windows Script to run Windows Explorer Search? | Excel Programming |