ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problems with auto_open (https://www.excelbanter.com/excel-programming/311541-problems-auto_open.html)

jmoffat[_10_]

Problems with auto_open
 

I am trying to use auto_open to create some toolbar buttons and the
hide the workbook containing the macros.

Everything works fine if I run the workbook from my hard drive or ove
a shared drive.

The prblem comes if the workbook is opened over the web by clicking o
a hyperlink.

In this case the workbook does not become invisible for some reason.
I've tried hardwiring the window name (from the web) into th
window.visible statement - but no luck.

Please help - this is driving me nuts !

The code in question:

macro_file = "http://server_name/sub_dir/my_macro_file.xls"
On Error GoTo not_web
Windows(macro_file).Visible = False
GoTo the_end
not_web:
is_visible = Windows("my_macro_file.xls").Visible
If (is_visible) Then Windows("my_macro_file.xls").Visible = False
the_end

--
jmoffa
-----------------------------------------------------------------------
jmoffat's Profile: http://www.excelforum.com/member.php...nfo&userid=115
View this thread: http://www.excelforum.com/showthread.php?threadid=26374



All times are GMT +1. The time now is 01:50 AM.

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