I am sorry that I couldn't find this information with search. It keeps returning information from all forums.
Anyway, I am opening an XLS spread sheet in Internet Explorer. When I close it, I run the following:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("File").Controls.Item("save").Enabled = True
Application.CommandBars("File").Controls.Item("save as...").Enabled = True
If Val(Application.Version) > 8 Then
Application.CommandBars("File").Controls.Item("Save as Web Pa&ge...").Enabled = True
End If
Application.CommandBars("File").Controls.Item("Save &Workspace...").Enabled = True
Application.CommandBars("Tools").Controls.Item("Protection").Enabled = True
Application.CommandBars("Tools").Controls.Item("Macro").Enabled = True
End Sub
I get a run time error 5 on the first command. This doesn't happen in an other versions of Excel (97,2000,2003). Any ideas?
Anyway, I am opening an XLS spread sheet in Internet Explorer. When I close it, I run the following:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("File").Controls.Item("save").Enabled = True
Application.CommandBars("File").Controls.Item("save as...").Enabled = True
If Val(Application.Version) > 8 Then
Application.CommandBars("File").Controls.Item("Save as Web Pa&ge...").Enabled = True
End If
Application.CommandBars("File").Controls.Item("Save &Workspace...").Enabled = True
Application.CommandBars("Tools").Controls.Item("Protection").Enabled = True
Application.CommandBars("Tools").Controls.Item("Macro").Enabled = True
End Sub
I get a run time error 5 on the first command. This doesn't happen in an other versions of Excel (97,2000,2003). Any ideas?