Hello,
I have a command button by the name "cmdTurn" that updates a chart when clicked. I want to create message box that checks the chart to see if a particular legend label exists (e.g., "Profit") then it tells the user that this legend label already exists therefore exit the sub. I'm thinking something like this:
My command button name is: cmdTurn
My chart object name is: chartTurn
-BC
I have a command button by the name "cmdTurn" that updates a chart when clicked. I want to create message box that checks the chart to see if a particular legend label exists (e.g., "Profit") then it tells the user that this legend label already exists therefore exit the sub. I'm thinking something like this:
My command button name is: cmdTurn
My chart object name is: chartTurn
Code:
[CODE]If Me.chartTurn.Legend.("Profit") = true
MsgBox ("The Profit legend label already exists,")
then
Exit Sub
Else
execute cmdTurn VBA code I had already wrote
End Sub
-BC
Last edited: