Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created a template where users may want to show two black boxes on the
page at any point. The sheet has to be printed two ways. Once plain and once with these two black boxes which cover up the values in two columns. I created buttons to turn these boxes "on" and "off." I don't delete the boxes when the user wants to change them, I just have a macro attached the buttons which change their color to white (or transparent). If you happen to create buttons to toggle your circles, you can right click on the button, choose Format Control, and uncheck Print object under the Properties tab. This way, the user can see the buttons at all times, but they won't print. I see you already know the name of your object. The only tricky part about this is that.. if you protect the sheet, you have to make sure that either object your are selecting to change is in an unlocked cell OR you choose to allow the user to "Edit Objects." If you allow them to edit objects, they could change the buttons on your form, but you can always send them to another cell so that they don't even notice they have this privilege. You need to go to your VB editor and create a module under your project, then add this... to some extent. Then you would have to go back to your sheet and attach the macros to your buttons (if you're going to use buttons). Your code would look like: Code: -------------------- Sub DotOff() ActiveSheet.Shapes("Oval 26").Select Selection.ShapeRange.Fill.Visible = msoFalse Range("A10").Select End Sub Sub DotOn() ActiveSheet.Shapes("Oval 26").Select Selection.ShapeRange.Fill.Visible = msoTrue Range("A10").Select End Sub -------------------- If you want to do something tricky like send the user back to whatever range they were in... you'll have to assign their range to some variable, then send them there afterwards. I'll let you figure that one out. Its too early in the morning for me! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007: Selecting multiple objects by drawing a selection box | Excel Discussion (Misc queries) | |||
drawing shapes move when printing | Charts and Charting in Excel | |||
selecting multiple objects with macro | Excel Discussion (Misc queries) | |||
When drawing shapes in excel the shapes keep disappearing | Excel Discussion (Misc queries) | |||
Drawing shapes in a chart | Charts and Charting in Excel |