Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problem with checkbox control | Excel Worksheet Functions | |||
how do I protect a worksheet and still use a checkbox control | Excel Worksheet Functions | |||
font size changes w/ control focus | Excel Worksheet Functions | |||
VBA Control Checkbox | Excel Programming | |||
Simulating the Format Painter, Selection.Select, and taking focus | Excel Programming |