Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 21
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a chart axis visible/invisible with VBA Jeff Reese Charts and Charting in Excel 3 April 27th 23 03:42 AM
make button invisible if macros disabled Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 0 November 29th 07 08:43 PM
How to make hidden sheet invisible LLee2 New Users to Excel 9 April 8th 07 06:58 AM
Check Box to switch make comments visible or invisible DanHegarty Excel Discussion (Misc queries) 1 June 10th 06 04:08 PM
Determine when checkbox is clicked wAyne Excel Discussion (Misc queries) 1 February 21st 06 08:35 PM


All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"