ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running macro in a browser window (https://www.excelbanter.com/excel-programming/273483-running-macro-browser-window.html)

Ted Theodoropoulos

Running macro in a browser window
 
I have a workbook that runs some VBA code that works fine when the
workbook is opened from within Excel but gives various errors when I
open the workbook using a link on a web page. When I click the link
the workbook opens up in the browser and IE says that it's in the
"Unknown Zone" even though IIS is running on my local machine. I'm
getting errors on several lines of code but as an example I get error
1004 "Application-defined or object-defined error" when I run the
following line.

Worksheets("NAICS (Hidden)").Visible = xlSheetVisible

I'm confident the solution is to somehow get IE to open this workbook
in the Intranet Zone. This should actually already be happening
because when I go to Tools-Internet Options-Security and the select
Intranet Zone and click the Sites button, the domain my machine is on
is listed. Any ideas on this one?

Greg Griffiths

Running macro in a browser window
 
Check out http://www.greggriffiths.org/webdev/both/excel/ which covers
using Excel and IE together and some of the issues, perhaps that or the
links from there will assist.

Ted Theodoropoulos wrote:

I have a workbook that runs some VBA code that works fine when the
workbook is opened from within Excel but gives various errors when I
open the workbook using a link on a web page. When I click the link
the workbook opens up in the browser and IE says that it's in the
"Unknown Zone" even though IIS is running on my local machine. I'm
getting errors on several lines of code but as an example I get error
1004 "Application-defined or object-defined error" when I run the
following line.

Worksheets("NAICS (Hidden)").Visible = xlSheetVisible

I'm confident the solution is to somehow get IE to open this workbook
in the Intranet Zone. This should actually already be happening
because when I go to Tools-Internet Options-Security and the select
Intranet Zone and click the Sites button, the domain my machine is on
is listed. Any ideas on this one?




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com