Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Box around selected range
I suspect you are setting the userinterfaceonly property of the sheets in
the workbook_open event. I have found if you set protection on a sheet in workbook_open when the sheet is not active, you get this type of behavior Try set sh1 = activeSheet Application.ScreenUpdating = False for each sh in thisWorkbook.Worksheets sh.Activate sh.Protect UserInterfaceOnly:=True ' other options Next sh1.activate Application.ScreenUpdating = True -- Regards, Tom Ogilvy Terry von Gease wrote in message ... What could happen to cause the frame around the currently selected range on a sheet to not appear? The sheet behaves normally if you mouse, tab, or what-have-you to an unlocked cell or range in that the cell address in the formula bar is correct for where you are but no frame appears This seems to affect any or all sheets in a workbook form time to time. Mostly more than less. All of the sheets feature small ranges of unlocked cells and are all in protected mode with only the ability to select unlocked cells. The sheets are protected with UserInterfaceOnly:=True If you manually unprotect any of the sheets and then manually protect them again the problem goes away. The box around the selection functions exactly as it should. If you free up the selection highlight on all the sheets and save the workbook the next time you open it the selection highlight once more isn't working properly. I'm sure I'm setting up something wrong somewhere, there's lots of code invoked at WorkBook_Open time that diddles the various sheets but it's unclear just what is causing this. -- Terry "I said I never had much use for one, I never said I didn't know how to use one." M. Quigley |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Box around selected range
You're exactly right. In fact, with other than trivial variation in naming,
the loop you presented is identical with the loop I was using except for the Activate. Thanks, I do appreciate it. Are there many of these little anomalies that can leap out of the canebrake and bite you on the ass? -- Terry "I said I never had much use for one, I never said I didn't know how to use one." M. Quigley "Tom Ogilvy" wrote in message ... I suspect you are setting the userinterfaceonly property of the sheets in the workbook_open event. I have found if you set protection on a sheet in workbook_open when the sheet is not active, you get this type of behavior Try set sh1 = activeSheet Application.ScreenUpdating = False for each sh in thisWorkbook.Worksheets sh.Activate sh.Protect UserInterfaceOnly:=True ' other options Next sh1.activate Application.ScreenUpdating = True -- Regards, Tom Ogilvy Terry von Gease wrote in message ... What could happen to cause the frame around the currently selected range on a sheet to not appear? The sheet behaves normally if you mouse, tab, or what-have-you to an unlocked cell or range in that the cell address in the formula bar is correct for where you are but no frame appears This seems to affect any or all sheets in a workbook form time to time. Mostly more than less. All of the sheets feature small ranges of unlocked cells and are all in protected mode with only the ability to select unlocked cells. The sheets are protected with UserInterfaceOnly:=True If you manually unprotect any of the sheets and then manually protect them again the problem goes away. The box around the selection functions exactly as it should. If you free up the selection highlight on all the sheets and save the workbook the next time you open it the selection highlight once more isn't working properly. I'm sure I'm setting up something wrong somewhere, there's lots of code invoked at WorkBook_Open time that diddles the various sheets but it's unclear just what is causing this. -- Terry "I said I never had much use for one, I never said I didn't know how to use one." M. Quigley |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to write (Selected range - 1) | Excel Discussion (Misc queries) | |||
how to add 130% to a selected range of numbers ? | Excel Discussion (Misc queries) | |||
Setting var to selected Range | Excel Discussion (Misc queries) | |||
Reclaculating a selected range | Excel Discussion (Misc queries) | |||
delete every nth row in selected range | Excel Discussion (Misc queries) |