Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Strange problem ... Excel 2002 SP2 Win2000
I have written code to query a SQL db using ADO ... works great! The workbook consists of several worksheets ... some are hidden an some not. My code will hide certain sheets when: Private Workbook_Activate() shtTodayHours.Visible = xlSheetHidden and protect others ... With shtPunches .Protect Contents:=True, UserInterfaceonly:=True .EnableSelection = xlNoSelection End With then I reverse the process ... Private Sub Workbook_Deactivate() For Each wks In Worksheets wks.Visible = True 'unhide all worksheets wks.Unprotect next wks My problem is that I had a few buttons and checkboxes on some sheet that were only hidden, not protected that have disappeared sometim during the testing of my code and I can't replace them. All sheets ar not protected and the workbook is not either (and never was) but th controls on the Forms & Control Toolbox are grayed out (except Toggl Grid on the Forms & Design Mode, Properties, and View Code on th Control Toolbox) so I can't add any new controls. If I Insert a new worksheet into the existing workbook, I still can' add any controls. If I create a New workbook, I can add control there. Any ideas what has happened? Mike Angellotti:confused -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Update:
If I copy the sheets to a new workbook, the controls re-appear. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to enable the Unprotected Worksheet menu | Excel Worksheet Functions | |||
how to navigate through unprotected cells only in a worksheet | New Users to Excel | |||
Delete unprotected cells in protected worksheet | Excel Worksheet Functions | |||
Why would you be unable to rename an unprotected worksheet? | Excel Discussion (Misc queries) | |||
Messagebox: Alert user Worksheet is Unprotected | Excel Programming |