Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Taking focus off a Control Checkbox

At the top of each event procedure

ActiveCell.Activate

or

Selection.Select

--
Regards,
Tom Ogilvy


Don Wiss wrote in message
...
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.



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
problem with checkbox control Giselle Excel Worksheet Functions 1 March 31st 06 12:57 PM
how do I protect a worksheet and still use a checkbox control JayS Excel Worksheet Functions 4 September 8th 05 07:36 AM
font size changes w/ control focus mark kubicki Excel Worksheet Functions 0 June 17th 05 06:00 PM
VBA Control Checkbox Tommy[_6_] Excel Programming 2 August 7th 03 06:02 PM
Simulating the Format Painter, Selection.Select, and taking focus David McRitchie[_2_] Excel Programming 3 July 10th 03 03:48 AM


All times are GMT +1. The time now is 09:38 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"