PC Review


Reply
Thread Tools Rate Thread

How to detect if workbook is running in Internet Explorer

 
 
Greg Lovern
Guest
Posts: n/a
 
      24th Mar 2008
Apparently some of our users are trying to run our workbook in
Internet Explorer instead of in Excel. Works fine with some other
workbooks but not with the code in our workbook.

We don't have the time to try to get it to work in Internet Explorer
right now. Instead, we'd like to detect whether the workbook is
running in IE, and exit, after maybe a brief message to the user. For
example:

If IsRunningInIE Then Exit Sub

Or, in the Workbook Open Event:

If IsRunningInIE Then
MsgBox "Explanatory message, etc."
Exit Sub


Any suggestions?


Thanks,

Greg
 
Reply With Quote
 
 
 
 
Greg Lovern
Guest
Posts: n/a
 
      24th Mar 2008
> If IsRunningInIE Then
> MsgBox "Explanatory message, etc."
> Exit Sub


Sorry, I meant:


If IsRunningInIE Then
MsgBox "Explanatory message, etc."
Exit Sub
End If


Greg
 
Reply With Quote
 
GTVT06
Guest
Posts: n/a
 
      24th Mar 2008
On Mar 24, 2:29*pm, Greg Lovern <gr...@gregl.net> wrote:
> > If IsRunningInIE Then
> > * * MsgBox "Explanatory message, etc."
> > Exit Sub

>
> Sorry, I meant:
>
> If IsRunningInIE Then
> * * MsgBox "Explanatory message, etc."
> * * Exit Sub
> End If
>
> Greg


you can close it by looping thru open windows and closing down the
window if the URL = whatever shows up in the internet explorer URL
address bar whenever they open it in IE

Dim objShell, ObjShellWindows, objW
Set objShell = CreateObject("Shell.Application")
Set ObjShellWindows = objShell.Windows
For Each objW In ObjShellWindows
If objW.LocationURL Like "whatever shows up" Then
objW.Quit
End If
Next
Exit Sub
 
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
Internet Explorer running!! Hank Windows XP General 6 16th Jun 2007 04:20 AM
Internet Explorer 6 running under XP =?Utf-8?B?Sm9lIEJhbm5hbmFz?= Windows XP General 2 8th Mar 2006 12:28 AM
Internet explorer running under explorer.exe process =?Utf-8?B?bmlhdmx5cw==?= Windows XP Internet Explorer 3 2nd Jun 2005 01:58 PM
internet explorer keeps freezing, or can't detect websites =?Utf-8?B?ZWxpdzc1?= Windows XP Help 0 21st Jun 2004 01:27 AM
windows explorer running instead of internet explorer squon Windows XP Internet Explorer 5 30th Nov 2003 02:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:44 AM.