Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Activate Windows explorer

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   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Activate Windows explorer

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Explorer Philosophaie Excel Programming 6 October 5th 09 07:49 PM
How to activate (in the Project Explorer window) using VBA EagleOne Excel Discussion (Misc queries) 0 December 15th 06 02:26 AM
Windows().Activate vs Workbooks().Activate Gary''s Student Excel Programming 4 November 6th 06 02:01 PM
Windows Explorer maximizes over XL 2000, if opened w/ explorer bill Excel Discussion (Misc queries) 2 June 28th 05 02:53 PM
Use Windows Script to run Windows Explorer Search? Ian Elliott[_3_] Excel Programming 0 January 12th 04 05:03 PM


All times are GMT +1. The time now is 08:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"