Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And google is nice, too!!
Jason, Frederick wrote: Dave, Your are a the MASTER! Thank you. I have been pulling my hair out for the last 6 hours because no one on here really either understood the initial question or just had no clue. The bottom line was, the code needed to be saved and that could not be done because the code was running. Thank you for providing the "immediate window" and "application.enableevents = false" command thus allowing me to save the file blank. Jason Dave Peterson wrote: CATCH-22 won't let me save the file 26-Mar-08 Before you (as the developer, not the user) save the file, you can turn off events. Open the VBE hit ctrl-g to see the immediate window type this and hit enter: application.enableevents = false Then save your workbook--the _beforesave event won't fire. Then back to the VBE and toggle the setting in the immediate window: application.enableevents = true ==== You could also do other stuff, too. Maybe check the username? if lcase(application.username) = lcase("Patrick Riley") then 'do nothing, let it save... 'or clear that cell! me.sheets("Main").range("e59").value = "" else If IsEmpty(me.Sheets("Main").Range("E59").Value) Then MsgBox "You must type in your name before " & _ "this file can be saved.", 16, "ERROR" Cancel = True End If end if Patrick Riley wrote: -- Dave Peterson EggHeadCafe - Software Developer Portal of Choice ASP.NET Session State FAQs http://www.eggheadcafe.com/tutorials...state-faq.aspx -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to catch data from a EXCEL file | Excel Discussion (Misc queries) | |||
Excel Interop Catch Event for Saving a file as xls and as xml? | Excel Programming | |||
Excel marcos firing on file save as but not file save | Excel Programming | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming | |||
Catch FileSave/Save As/etc... | Excel Programming |