Excel 2000, Disable Macros, Close Workbook 
Author Message
 Excel 2000, Disable Macros, Close Workbook

Hello, is it possible to write code in       Private Sub Workbook_Open(), so
that
if when the workbook is opened, and disable macros is chosen, then the
workbook closes.

Many thanks in advance for your time and replies.

Cordially yours

Johnny Trub



Tue, 12 Apr 2005 19:41:32 GMT  
 Excel 2000, Disable Macros, Close Workbook
On Fri, 25 Oct 2002 19:41:32 +0100, "J Trubshaw"

Quote:

>Hello, is it possible to write code in       Private Sub Workbook_Open(), so
>that
>if when the workbook is opened, and disable macros is chosen, then the
>workbook closes.

>Many thanks in advance for your time and replies.

No. But if it's essential that macros be enabled the usual approach is
to have all sheets hidden except for one. That one sheet advises the
user that macros must be enabled to use the workbook. The Workbook
Open event hides that sheet and makes all of the other sheets visible,
and the Workbook BeforeClose event does the reverse.

---------------------------------------------------------
Hank Scorpio

* Please keep all replies in this Newsgroup. Thanks! *



Tue, 12 Apr 2005 22:25:40 GMT  
 Excel 2000, Disable Macros, Close Workbook
Forget my question its just dawned on me it crass,

Sorry for any inconvienence

Johnny Trub


Quote:
> Hello, is it possible to write code in       Private Sub Workbook_Open(),
so
> that
> if when the workbook is opened, and disable macros is chosen, then the
> workbook closes.

> Many thanks in advance for your time and replies.

> Cordially yours

> Johnny Trub



Thu, 14 Apr 2005 12:54:49 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Disable Macros to close Workbook

2. Macro to open a workbook, work in that workbook, than close the workbook (saved)

3. Disable X box from Closing Workbook or Excel

4. Disabling a closed workbook from an open workbook

5. Disabling close button on Excel workbook window

6. Excel very slow to open Excel 97/2000 Workbook with macros

7. How to disable Dialog when opening Workbook with Excel 4.0 Macro (from Code)

8. How to disable the macro in an Excel xls file when use workbook.open

9. Closing an excel workbook opened through Internet Exlporer with a macro

10. Excel closing a workbook out while running a macro


 
Powered by phpBB® Forum Software © phpBB Group