Results 1 to 6 of 6

Checkbox disappear lines n chart?

Threaded View

Frigide Checkbox disappear lines n... 02-14-2019, 10:27 AM
Frigide Re: Checkbox disappear lines... 02-14-2019, 10:42 AM
Frigide Re: Checkbox disappear lines... 02-14-2019, 11:08 AM
Frigide Re: Checkbox disappear lines... 02-14-2019, 03:12 PM
Frigide Re: Checkbox disappear lines... 02-14-2019, 11:23 PM
Frigide Re: Checkbox show/hide lines... 02-15-2019, 12:12 PM
  1. #3
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Checkbox disappear lines n chart?

    Second question. The bars in the chart can not be checked or unchecked. Because of the macro is referring to lines. What is the command for the bars?

    I have 2 charts in one sheet. Therefor i made unother macro

    Sub HideShowLineGrafiek2()
      Application.ScreenUpdating = False
      Dim i As Integer
      For i = 8 To 14
        If ActiveSheet.CheckBoxes("Check Box " & i).Value = -4146 Then
          ActiveSheet.ChartObjects("Grafiek 2").Activate
          ActiveChart.SeriesCollection(i).Format.Line.Visible = msoFalse
        Else
          ActiveSheet.ChartObjects("Grafiek 2").Activate
          ActiveChart.SeriesCollection(i).Format.Line.Visible = msoTrue
        End If
      Next i
      
    End Sub
    
    Sub AssignMacro()
      Application.ScreenUpdating = False
      Dim i As Integer
      For i = 8 To 14
        ActiveSheet.Shapes.Range(Array("Check Box " & i)).Select
        Selection.OnAction = "HideShowLineGrafiek2"
      Next i
    End Sub

    As you van see the same except de i are different. But when i unchecked or check a box i got a error that

    ActiveChart.SeriesCollection(i).Format.Line.Visible = msoTrue is a invalid parameter
    Last edited by Frigide; 02-14-2019 at 01:37 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] [SOLVED] making a checkbox appear and disappear based on a cell's value
    By yoram in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-12-2021, 11:36 PM
  2. Checkbox or radio buttons that make other cells appear or disappear?
    By mjennings1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2014, 12:03 PM
  3. [SOLVED] Making a Checkbox appear and disappear using a drop box selection
    By simon@natsow.co.za in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2013, 09:38 AM
  4. How to get the lines to disappear?
    By brightoceanlight@hotmail.com in forum Excel General
    Replies: 1
    Last Post: 06-12-2006, 05:35 PM
  5. [SOLVED] EXCEL 2003 - LINES DRAWN ON CHART DISAPPEAR - WILL NOT STAY VISABL
    By SCPU173 in forum Excel General
    Replies: 0
    Last Post: 03-15-2006, 12:35 AM
  6. Lines of a cell disappear HELP!
    By pgruening in forum Excel General
    Replies: 2
    Last Post: 09-07-2005, 06:19 PM
  7. Pie chart data labels and lines disappear
    By Sally Sibthorpe in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-15-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1