I have a macro that is only working the first time it is executed with a button. It also works when I push the test button from the Edit Module box. This is getting a bit frustrating. Any thoughts???
Requested Module Security is Safe Only
Current Local Security is Safe Mode
Here's the code but I don't think its the problem.
Sub RestoreMainCharts()
' Temporarily turn off the AutoMinimize so that we can ' put 2 charts on the front panel without them auto-minimizing ' themselves. SetAutoMinimize "CH74", false SetAutoMinimize "CH75", false
' Minimize all the chart objects. ActiveDocument.GetSheetObject("CH67").Minimize ActiveDocument.GetSheetObject("CH68").Minimize ActiveDocument.GetSheetObject("CH69").Minimize ActiveDocument.GetSheetObject("CH70").Minimize ActiveDocument.GetSheetObject("CH72").Minimize ActiveDocument.GetSheetObject("CH73").Minimize
End Sub
Sub SetAutoMinimize(chart, state) rem ** Set auto-minimize flag for a chart ** set g = ActiveDocument.GetSheetObject(chart) set gp = g.GetProperties gp.GraphLayout.Frame.AutoMinimize = state g.SetProperties gp
So it appears to be something with the button. I deleted all the other actions except Run Macro and it Works. I think I just need to inclued the code for the other actions.