Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
How to make a checkbox on a chart invisible when it is clicked?
How to make a checkbox on a chart invisible when it is clicked? I have some
code which hides a coulmn when a checkbox is clicked. Now my users want not only hide the column, but also get the checkbox itself to "go away" - I translate it as "make invisible " Now I have the code: Sub Check_Box_Click() Sheets("Summary_Worksheet").Select Select Case Application.Caller Case "cbI40" Columns("I").Select Case "cbJ40" Columns("J").Select Case "cbK40" Columns("K").Select Case Else End Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Sheets("Star-plot").Select End Sub I want to get something like that working: Sub Check_Box_Click() Sheets("Summary_Worksheet").Select Select Case Application.Caller Case "cbI40" ActiveSheet.Shapes("cbI40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("I").Select Case "cbJ40" ActiveSheet.Shapes("cbJ40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("J").Select Case "cbK40" ActiveSheet.Shapes("cbK40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("K").Select Case Else End Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Sheets("Star-plot").Select End Sub the plan is that appropriate checkbox will became hidden first and then appropriate column will be selected and in the If than else whichever column is selected, will get hidden as well (part with columns works fine) Thank you |
#2
Posted to microsoft.public.excel.charting
|
|||
|
|||
How to make a checkbox on a chart invisible when it is clicked?
Hi Naum,
Try this activesheet.checkboxes("CBI40").visible=false and so on. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Naum" wrote in message ... How to make a checkbox on a chart invisible when it is clicked? I have some code which hides a coulmn when a checkbox is clicked. Now my users want not only hide the column, but also get the checkbox itself to "go away" - I translate it as "make invisible " Now I have the code: Sub Check_Box_Click() Sheets("Summary_Worksheet").Select Select Case Application.Caller Case "cbI40" Columns("I").Select Case "cbJ40" Columns("J").Select Case "cbK40" Columns("K").Select Case Else End Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Sheets("Star-plot").Select End Sub I want to get something like that working: Sub Check_Box_Click() Sheets("Summary_Worksheet").Select Select Case Application.Caller Case "cbI40" ActiveSheet.Shapes("cbI40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("I").Select Case "cbJ40" ActiveSheet.Shapes("cbJ40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("J").Select Case "cbK40" ActiveSheet.Shapes("cbK40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("K").Select Case Else End Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Sheets("Star-plot").Select End Sub the plan is that appropriate checkbox will became hidden first and then appropriate column will be selected and in the If than else whichever column is selected, will get hidden as well (part with columns works fine) Thank you |
#3
Posted to microsoft.public.excel.charting
|
|||
|
|||
How to make a checkbox on a chart invisible when it is clicked
Thank you, Bob!
Works great - exactly what I needed. "Bob Phillips" wrote: Hi Naum, Try this activesheet.checkboxes("CBI40").visible=false and so on. -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Naum" wrote in message ... How to make a checkbox on a chart invisible when it is clicked? I have some code which hides a coulmn when a checkbox is clicked. Now my users want not only hide the column, but also get the checkbox itself to "go away" - I translate it as "make invisible " Now I have the code: Sub Check_Box_Click() Sheets("Summary_Worksheet").Select Select Case Application.Caller Case "cbI40" Columns("I").Select Case "cbJ40" Columns("J").Select Case "cbK40" Columns("K").Select Case Else End Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Sheets("Star-plot").Select End Sub I want to get something like that working: Sub Check_Box_Click() Sheets("Summary_Worksheet").Select Select Case Application.Caller Case "cbI40" ActiveSheet.Shapes("cbI40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("I").Select Case "cbJ40" ActiveSheet.Shapes("cbJ40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("J").Select Case "cbK40" ActiveSheet.Shapes("cbK40").Select == I know that is wrong (it does not work) Selection.Hidden = True Columns("K").Select Case Else End Select If Selection.EntireColumn.Hidden = False Then Selection.EntireColumn.Hidden = True Else Selection.EntireColumn.Hidden = False End If Sheets("Star-plot").Select End Sub the plan is that appropriate checkbox will became hidden first and then appropriate column will be selected and in the If than else whichever column is selected, will get hidden as well (part with columns works fine) Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Make a chart axis visible/invisible with VBA | Charts and Charting in Excel | |||
make button invisible if macros disabled | Excel Discussion (Misc queries) | |||
How to make hidden sheet invisible | New Users to Excel | |||
Check Box to switch make comments visible or invisible | Excel Discussion (Misc queries) | |||
Determine when checkbox is clicked | Excel Discussion (Misc queries) |