PC Review


Reply
Thread Tools Rate Thread

Activate Windows explorer

 
 
Ray
Guest
Posts: n/a
 
      12th Mar 2010
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
 
Reply With Quote
 
 
 
 
Ray
Guest
Posts: n/a
 
      12th Mar 2010
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activate Windows Explorer column movement only on mouseover eganders Windows Vista General Discussion 8 13th Oct 2008 10:25 PM
Activate Windows Explorer column movement only on mouseover eganders Windows Vista Performance 8 13th Oct 2008 10:25 PM
Re: How to activate the Preview Pane in Windows Explorer? Tom Lake Windows Vista General Discussion 0 10th Mar 2008 02:26 PM
Can't Activate - Clicking Activate Windows Does Nothing :( war59312 Windows Vista General Discussion 1 6th Mar 2007 07:31 AM
Windows().Activate vs Workbooks().Activate =?Utf-8?B?R2FyeScncyBTdHVkZW50?= Microsoft Excel Programming 4 6th Nov 2006 02:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:40 PM.