Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set EnableAutoRecover to False
I have an Excel application that is used by manys users with Excel
versions varying from Excel 2000 to Excel 2007. WIth the release of Excel 2007, you must Digitally sign the project to enable macros. However, Microsoft has a known bug that results in the users being unable to save the file at times. The bug is a combination of Autorecover and the digital signature. Microsoft's solution is to disable autorecover. That can be done using: ActiveWorkbook.EnableAutoRecover = False However, since autorecovery was not available in Excel 2000, the workbook has a compilaion error. I tried using conditinal compilation, but I could not figure out how to use the Excel version in the conditional compilation. I also thought I may be able to use CallByName to solve this, but I couldn't figure out how to use that with the ActiveWorkbook.EnableAutoRecover statement. Any help will be MUCH appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set EnableAutoRecover to False
I'd create a new module with a single sub in it:
Option Explicit Sub OnlyThisSub() ActiveWorkbook.EnableAutoRecover = False end Sub Then in any other module, you can use: if val(application.version) < 10 then call OnlyThisSub end if The code in that separate module won't be run or even compiled. (xl2002 is version 10, right???) (and change the name to something nice <vbg) Kent wrote: I have an Excel application that is used by manys users with Excel versions varying from Excel 2000 to Excel 2007. WIth the release of Excel 2007, you must Digitally sign the project to enable macros. However, Microsoft has a known bug that results in the users being unable to save the file at times. The bug is a combination of Autorecover and the digital signature. Microsoft's solution is to disable autorecover. That can be done using: ActiveWorkbook.EnableAutoRecover = False However, since autorecovery was not available in Excel 2000, the workbook has a compilaion error. I tried using conditinal compilation, but I could not figure out how to use the Excel version in the conditional compilation. I also thought I may be able to use CallByName to solve this, but I couldn't figure out how to use that with the ActiveWorkbook.EnableAutoRecover statement. Any help will be MUCH appreciated. -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set EnableAutoRecover to False
On Jan 24, 9:09*pm, Dave Peterson wrote:
I'd create a new module with a single sub in it: Option Explicit Sub OnlyThisSub() * *ActiveWorkbook.EnableAutoRecover = False end Sub Then in any other module, you can use: if val(application.version) < 10 then * * call OnlyThisSub end if The code in that separate module won't be run or even compiled. (xl2002 is version 10, right???) (and change the name to something nice <vbg) Kent wrote: I have an Excel application that is used by manys users with Excel versions varying from Excel 2000 to Excel 2007. WIth the release of Excel 2007, you must Digitally sign the project to enable macros. However, Microsoft has a known bug that results in the users being unable to save the file at times. The bug is a combination of Autorecover and the digital signature. Microsoft's solution is to disable autorecover. *That can be done using: ActiveWorkbook.EnableAutoRecover = False However, since autorecovery was not available in Excel 2000, the workbook has a compilaion error. I tried using conditinal compilation, but I could not figure out how to use the Excel version in the conditional compilation. I also thought I may be able to use CallByName to solve this, but I couldn't figure out how to use that with the ActiveWorkbook.EnableAutoRecover statement. Any help will be MUCH appreciated. -- Dave Peterson- Hide quoted text - - Show quoted text - Thank you VERY much Dave. I did not realize that it would not try to compile a module unless the code within it was to be executed. Obvious I guess. Your response is a great solution. Tank you again. You have saved me a lot of grief! Kent |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set EnableAutoRecover to False
First, I had my test backwards!
if val(application.version) = 10 then call OnlyThisSub end if (but you probably caught that!) I don't have xl2k to test, but you could try this, too: Dim myApp as Object 'generic object .... if val(application.version) = 10 then set myApp = Application myapp.activeworkbook.enableautorecover = false end if Kent wrote: On Jan 24, 9:09 pm, Dave Peterson wrote: I'd create a new module with a single sub in it: Option Explicit Sub OnlyThisSub() ActiveWorkbook.EnableAutoRecover = False end Sub Then in any other module, you can use: if val(application.version) < 10 then call OnlyThisSub end if The code in that separate module won't be run or even compiled. (xl2002 is version 10, right???) (and change the name to something nice <vbg) Kent wrote: I have an Excel application that is used by manys users with Excel versions varying from Excel 2000 to Excel 2007. WIth the release of Excel 2007, you must Digitally sign the project to enable macros. However, Microsoft has a known bug that results in the users being unable to save the file at times. The bug is a combination of Autorecover and the digital signature. Microsoft's solution is to disable autorecover. That can be done using: ActiveWorkbook.EnableAutoRecover = False However, since autorecovery was not available in Excel 2000, the workbook has a compilaion error. I tried using conditinal compilation, but I could not figure out how to use the Excel version in the conditional compilation. I also thought I may be able to use CallByName to solve this, but I couldn't figure out how to use that with the ActiveWorkbook.EnableAutoRecover statement. Any help will be MUCH appreciated. -- Dave Peterson- Hide quoted text - - Show quoted text - Thank you VERY much Dave. I did not realize that it would not try to compile a module unless the code within it was to be executed. Obvious I guess. Your response is a great solution. Tank you again. You have saved me a lot of grief! Kent -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu | Excel Discussion (Misc queries) | |||
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 | Excel Programming | |||
$C$1972,2,FALSE, $C$1972,3,FALSE is ok, But $C$1972,4,FALSE Give # | Excel Worksheet Functions | |||
IF(a1="x",(vlookup 18K rows,2,false),(vlookup 18K,3,false)) RAM? | Excel Worksheet Functions | |||
True Or False, no matter what... it still displays the false statement | Excel Programming |