P
pc
I have written some code which generally does exactly what I want it
to. However, when a new user runs it for the first time, they get a
400 error with no explanation, just a red cross.
I can repeat their experience by unchecking Analysis ToolPak and
Analysis ToolPak - VBA from Tools > Add-Ins, and then re-opening the
spreadsheet. If I step through the code though, the error does not
occur.
I have removed the majority of my code, to try to establish where the
bug occurs, and I have found that even the few lines below will
reproduce the same error.
Sub Workbook_Open()
AddIns("Analysis ToolPak").Installed = True
AddIns("Analysis ToolPak - VBA").Installed = True
Sheets(1).Select
End Sub
It appears that I cannot select a worksheet after the Analysis ToolPak
is installed by code. I use Excel 2000 / Windows 2000 at home and
Excel 2002 / Windows XP at work, but both set-ups give me the same
problem.
I would be most grateful for any assistance on this. Many thanks in
anticipation.
Philip Clarke
to. However, when a new user runs it for the first time, they get a
400 error with no explanation, just a red cross.
I can repeat their experience by unchecking Analysis ToolPak and
Analysis ToolPak - VBA from Tools > Add-Ins, and then re-opening the
spreadsheet. If I step through the code though, the error does not
occur.
I have removed the majority of my code, to try to establish where the
bug occurs, and I have found that even the few lines below will
reproduce the same error.
Sub Workbook_Open()
AddIns("Analysis ToolPak").Installed = True
AddIns("Analysis ToolPak - VBA").Installed = True
Sheets(1).Select
End Sub
It appears that I cannot select a worksheet after the Analysis ToolPak
is installed by code. I use Excel 2000 / Windows 2000 at home and
Excel 2002 / Windows XP at work, but both set-ups give me the same
problem.
I would be most grateful for any assistance on this. Many thanks in
anticipation.
Philip Clarke