Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Menu at start up
Hello all,
When I start a program I want the auto calculation to automaticly come on. I also want to ensure that when the program is open that no one can get to the macros. When the program is closed I want it to auto save and for anyother program that opens to open with a "normal" menu bar. I hope this makes sense.......Thank you in advance for all your help. Eric |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Menu at start up
Eric,
Here is some code for the autocalculation and saving. By your words; "no one can get to the macros." Are you trying to block them from the project or from running a macro period? 'Put this in a Auto_Open sub With Application .Calculation = xlAutomatic End With 'Do this to keep people from your code Go to Tools VBAProject properties, lock the project for viewing, and enter a password. 'Put this in a auto_Close sub ActiveWorkbook.Save "Eric" wrote: Hello all, When I start a program I want the auto calculation to automaticly come on. I also want to ensure that when the program is open that no one can get to the macros. When the program is closed I want it to auto save and for anyother program that opens to open with a "normal" menu bar. I hope this makes sense.......Thank you in advance for all your help. Eric |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Menu at start up
this is good but how do I get this macro to activate automaticly when I open
this book? Also, you told me about the auto_close sub How do I get that to work automaticly? As you can see this is new territory for me....... Eric "JRForm" wrote: Eric, Here is some code for the autocalculation and saving. By your words; "no one can get to the macros." Are you trying to block them from the project or from running a macro period? 'Put this in a Auto_Open sub With Application .Calculation = xlAutomatic End With 'Do this to keep people from your code Go to Tools VBAProject properties, lock the project for viewing, and enter a password. 'Put this in a auto_Close sub ActiveWorkbook.Save "Eric" wrote: Hello all, When I start a program I want the auto calculation to automaticly come on. I also want to ensure that when the program is open that no one can get to the macros. When the program is closed I want it to auto save and for anyother program that opens to open with a "normal" menu bar. I hope this makes sense.......Thank you in advance for all your help. Eric |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Menu at start up
Eric,
Open the code window and look in the project pane for "This Workbook" and select it. Post this in the code module. Once your code is in place then close and open the file Private Sub Workbook_BeforeClose(Cancel As Boolean) 'place code in here to execute the code at close of spreadsheet End Sub Private Sub Workbook_Open() 'Place code in here if you want it run when the file is opened End Sub "Eric" wrote: this is good but how do I get this macro to activate automaticly when I open this book? Also, you told me about the auto_close sub How do I get that to work automaticly? As you can see this is new territory for me....... Eric "JRForm" wrote: Eric, Here is some code for the autocalculation and saving. By your words; "no one can get to the macros." Are you trying to block them from the project or from running a macro period? 'Put this in a Auto_Open sub With Application .Calculation = xlAutomatic End With 'Do this to keep people from your code Go to Tools VBAProject properties, lock the project for viewing, and enter a password. 'Put this in a auto_Close sub ActiveWorkbook.Save "Eric" wrote: Hello all, When I start a program I want the auto calculation to automaticly come on. I also want to ensure that when the program is open that no one can get to the macros. When the program is closed I want it to auto save and for anyother program that opens to open with a "normal" menu bar. I hope this makes sense.......Thank you in advance for all your help. Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Easy menu start | Excel Discussion (Misc queries) | |||
Lost Start up menu icon | Excel Discussion (Misc queries) | |||
Add item to Start Menu | Excel Programming | |||
Opening a file without the macro start menu | Excel Programming | |||
Start Excel from send menu | Excel Programming |