View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Wiss Don Wiss is offline
external usenet poster
 
Posts: 300
Default Taking focus off a Control Checkbox

I prefer the checkboxes that are on the Forms menu, but they don't allow
for move and size with cells. At least not in Excel 97. So when I have an
application where I hide rows, and I also want to have the checkboxes hide,
I have to use the checkboxes from the Control Menu.

But this creates a bunch of problems. If someone clicks on one, the focus
remains on the control. If one then tries to Unprotect the sheet it
crashes. So I error trap this and place the cursor somewhere on the sheet.
But now I find that I can't Unhide rows with the focus on the control. Now
before I write more and more error handlers, I figure there must be a
better way. Some macro code that puts the focus back on the cell that was
active before checking would be ideal, but when code is run for a control
the Activecell.Name is undefined.

Thanks, Don <donwiss at panix.com.