Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
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 LunaMoon Excel Discussion (Misc queries) 9 July 29th 08 12:28 AM
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 Matt Simpson Excel Programming 0 August 6th 07 08:11 PM
$C$1972,2,FALSE, $C$1972,3,FALSE is ok, But $C$1972,4,FALSE Give # Steved Excel Worksheet Functions 6 July 3rd 06 01:49 AM
IF(a1="x",(vlookup 18K rows,2,false),(vlookup 18K,3,false)) RAM? bchilt Excel Worksheet Functions 6 January 20th 06 09:21 AM
True Or False, no matter what... it still displays the false statement rocky640[_2_] Excel Programming 2 May 13th 04 04:57 PM


All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"