Can anyone tell me why the following code would prevent excel 2010 from doing a 'file->save as'?
Private Sub AddEvents()
'If xlApp Is Nothing Then SetApp
Dim Cmd As Shape
On Error Resume Next
For Each Cmd In xlBook.Sheets("CES").Shapes
' Do a check so if it fails On Error send to the else statement
Cmd.OnAction = "CESAddin.xlAppEvents." & Cmd.Name & "_Click"
If Cmd.OnAction = "" Then
Cmd.OnAction = "CESAddin.xlAppEvents.UnknownCMD_Click(""" & Cmd.Name & """)"
End If
Next Cmd
On Error GoTo 0
SetApp
End Sub
The code was written ny someone else not me.
Thanks
Bookmarks