ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB editor bug? (https://www.excelbanter.com/excel-programming/362337-vbulletin-editor-bug.html)

John

VB editor bug?
 
I am trying to use a spreadsheet that I made in Excel2003, on a machine
running Excel97. Specifically I am getting an error in Excel97 when invoking
the protect/unprotect methods of the ActiveSheet.

When I step through the code in the VB editor - it works fine; however, when
I run the code (i.e. with F5 or from a command button on the worksheet) it
errors out on the unprotect/protect methods.

This completely baffles me.

Has anyone else had this type of problem? Am I missing something obvious?

Tom Ogilvy

VB editor bug?
 
Change the TakeFocusOnClick property of the Commandbutton to False

this is a bug in Excel 97, fixed in later versions.

--
Regards,
Tom Ogilvy


"John" wrote:

I am trying to use a spreadsheet that I made in Excel2003, on a machine
running Excel97. Specifically I am getting an error in Excel97 when invoking
the protect/unprotect methods of the ActiveSheet.

When I step through the code in the VB editor - it works fine; however, when
I run the code (i.e. with F5 or from a command button on the worksheet) it
errors out on the unprotect/protect methods.

This completely baffles me.

Has anyone else had this type of problem? Am I missing something obvious?



All times are GMT +1. The time now is 04:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com