Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have an excel spreadsheet where I have cells that are mandatory to fill in.
I used the Before Save code in Thisworkbook and it worked. Now how can I suspend this action so I can save the file myself? -- Kelly |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Well, as written, you can't. Not without satisfying the conditions of the
save macro. A way around this is to have another condition in the macro that will bypass the check if present. Of course, if saving the file is your only purpose and you don't intend for anyone to use it in the short term, you can always remark-out that code. HTH Otto "Kelly" wrote in message ... I have an excel spreadsheet where I have cells that are mandatory to fill in. I used the Before Save code in Thisworkbook and it worked. Now how can I suspend this action so I can save the file myself? -- Kelly |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way is to disable events first.
In the VBE show the immediate window type this application.enableevents = false and hit enter Then save your file. Then turn events back on application.enableevents = True You may want to create a macro that does the same: Option Explicit Option Private Module Sub SecretSave() application.enableevents = false thisworkbook.save application.enableevents = true End Sub Kelly wrote: I have an excel spreadsheet where I have cells that are mandatory to fill in. I used the Before Save code in Thisworkbook and it worked. Now how can I suspend this action so I can save the file myself? -- Kelly -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dave,
What are the steps to create this macro? -- Kelly "Dave Peterson" wrote: One way is to disable events first. In the VBE show the immediate window type this application.enableevents = false and hit enter Then save your file. Then turn events back on application.enableevents = True You may want to create a macro that does the same: Option Explicit Option Private Module Sub SecretSave() application.enableevents = false thisworkbook.save application.enableevents = true End Sub Kelly wrote: I have an excel spreadsheet where I have cells that are mandatory to fill in. I used the Before Save code in Thisworkbook and it worked. Now how can I suspend this action so I can save the file myself? -- Kelly -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Open your workbook
hit alt-f11 to get to the VBE hit ctrl-r to see the project explorer Select your workbook's project Insert|module Paste that code into the newly opened code window. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Kelly wrote: Dave, What are the steps to create this macro? -- Kelly "Dave Peterson" wrote: One way is to disable events first. In the VBE show the immediate window type this application.enableevents = false and hit enter Then save your file. Then turn events back on application.enableevents = True You may want to create a macro that does the same: Option Explicit Option Private Module Sub SecretSave() application.enableevents = false thisworkbook.save application.enableevents = true End Sub Kelly wrote: I have an excel spreadsheet where I have cells that are mandatory to fill in. I used the Before Save code in Thisworkbook and it worked. Now how can I suspend this action so I can save the file myself? -- Kelly -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code to save excel sheet | Excel Discussion (Misc queries) | |||
How to save my VBA-code | Excel Worksheet Functions | |||
FILE 'SAVE AS' IN VBA CODE | Excel Discussion (Misc queries) | |||
Macro Save As Code??? | Excel Worksheet Functions | |||
Macro VBA code to name Save-As file | Excel Worksheet Functions |