Dynamic chart - Macro is running slow

skyvba

New Member
Joined
May 31, 2012
Messages
1
Hi All, I'm making a dynamic chart with code I found online (peltiertech.com), it was a post from 2009 so I hope you can help:

Sub ClickSeriesCheckbox()
Dim rCell As Range
For Each rCell In ActiveSheet.Range("TrueFalseRange").Cells
rCell.EntireColumn.Hidden = Not rCell.Value
Next
End Sub

This is causing my sheet to run very slowly. Is there something I can do to make it run faster?

I want to make a chart that changes according to the variables people select with the form control checkboxes. I'm using this code to hide the columns that are not being used, it is around 20 columns total and it takes about 10-15 sec each time I check/uncheck a box.

What would you do?

Thanks!
 

Forum statistics

Threads
1,226,883
Messages
6,193,497
Members
453,803
Latest member
hbvba

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top