PaulFogel123
Member
Hello,
I have a macro that executes very well if the user is on the Trend Analysis tab. Here is part of the code:
>>> use code - tags <<<
This code sets a minimum scale value for Chart 639 when a form control checkbox is clicked. The trouble is that this same checkbox is located on other tabs in the workbook, and they're all linked. It's used to include or exclude certain elements in the Total tabs, wherever such a rollup appears in the workbook. If I'm on the Total tab, which has the same checkbox, clicking it will generate an error--"the item with the specified name wasn't found." I think that means it's looking for Chart 639 and not finding it on the Total tab.
I only want this code to be executed when I'm on the Trend Analysis tab, and nowhere else. How can this be done?
Paul
I have a macro that executes very well if the user is on the Trend Analysis tab. Here is part of the code:
>>> use code - tags <<<
Code:
Sub Checkbox1_Click()
ActiveSheet.ChartObjcts("Chart 639").Activate
ActiveChart.Axes(xlValue).MinimumScale = Range ("Chart639')
End Sub
I only want this code to be executed when I'm on the Trend Analysis tab, and nowhere else. How can this be done?
Paul
Last edited by a moderator: