B
BU_Paul
The following error only happens when I start a new instance of excel
and will not re-occur if I close the workbook and re-open it.
When I open a particular application that has the solver reference
enabled, I get the following error:
Macro Error at Cell:
[Solver.xla]!Excel4Functions!A31
If I pick continue, there are no problems and all my macros work as
expected. If I pick step, I get Formula: =End.If() then I pick step
into and get Formula: =return(). I pick step into again and it
closes. And it still works fine after that.
This error occurs after the auto_open macro runs. Here is the macro:
Sub Auto_Open()
'
' Auto_Op Macro
' Macro recorded 3/23/2004
'
'
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
End With
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Worksheet Menu Bar").Controls(10).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(9).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(7).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(6).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(5).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(4).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(3).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(2).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(1).Delete
ActiveSheet.Unprotect "prs"
Rows("28:42").Select
Selection.EntireRow.Hidden = False
Range("I24").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Range("I25:O42").Select
Selection.Sort Key1:=Range("O25"), Order1:=xlDescending,
Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Rows("28:42").Select
Selection.EntireRow.Hidden = True
Range("I7").Select
ActiveSheet.Protect "prs", DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
Any suggestions? Thanks.
and will not re-occur if I close the workbook and re-open it.
When I open a particular application that has the solver reference
enabled, I get the following error:
Macro Error at Cell:
[Solver.xla]!Excel4Functions!A31
If I pick continue, there are no problems and all my macros work as
expected. If I pick step, I get Formula: =End.If() then I pick step
into and get Formula: =return(). I pick step into again and it
closes. And it still works fine after that.
This error occurs after the auto_open macro runs. Here is the macro:
Sub Auto_Open()
'
' Auto_Op Macro
' Macro recorded 3/23/2004
'
'
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
End With
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Worksheet Menu Bar").Controls(10).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(9).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(7).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(6).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(5).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(4).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(3).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(2).Delete
Application.CommandBars("Worksheet Menu Bar").Controls(1).Delete
ActiveSheet.Unprotect "prs"
Rows("28:42").Select
Selection.EntireRow.Hidden = False
Range("I24").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Range("I25:O42").Select
Selection.Sort Key1:=Range("O25"), Order1:=xlDescending,
Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Rows("28:42").Select
Selection.EntireRow.Hidden = True
Range("I7").Select
ActiveSheet.Protect "prs", DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub
Any suggestions? Thanks.