Thread: VB editor bug?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default 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?