If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Detecting IE or actual Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-18-06, 17:55
Teddy Teddy is offline
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
Detecting IE or actual Excel

I've been googling around and for the life of me I can't figure out how to programmatically discover if my end user has opened a spreadsheet in Excel or as an ActiveX object in IE. Some of the functionality in my sheet is not allowed to run in IE, so I would like to be able to detect this and disable certain buttons.

Any ideas?
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #2 (permalink)  
Old 08-19-06, 17:33
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I know you could find out if the spreadsheet is open at all in Excel but I' m not sure how to check whether a specific instance is open in Excel. Perhaps you can get the handle and compare that with the instance handle....

How accurate do you need to get?
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 08-20-06, 18:17
savbill savbill is offline
Registered User
 
Join Date: Feb 2004
Posts: 533
Quote:
Originally Posted by Teddy
I've been googling around and for the life of me I can't figure out how to programmatically discover if my end user has opened a spreadsheet in Excel or as an ActiveX object in IE.

Any ideas?
How would someone open your spreadsheet in IE? If I type a path to an Excel Workbook in the Address bar or use the Browser Open command it still opens the file in the Excel Application.

Perhaps you can check the application name? Try.

?Application.Name
Microsoft Excel

If Not Application.Name = "Microsoft Excel" Then
Msgbox "Please open this workbook in the Excel Application." & vbcrlf & _
"Functionality is not available in IE Browser"
Exit Sub
End If


I havn't tested this... may not work within the browser. Just my first guess to check for this condition.
__________________
~

Bill
Reply With Quote
  #4 (permalink)  
Old 08-21-06, 11:34
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by savbill
How would someone open your spreadsheet in IE? If I type a path to an Excel Workbook in the Address bar or use the Browser Open command it still opens the file in the Excel Application.
Dunno how Teddy's clients are doing it but try dragging an Excel file from a folder into an open IE window.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #5 (permalink)  
Old 09-01-06, 14:11
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Did you crack this one Teddy?
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On