monirg
Well-known Member
- Joined
- Jan 11, 2005
- Messages
- 629
Hello;
1) I have no choice but to transfer 10s of my (working perfectly) XL 2003 files to a new laptop running XL 2010 (full version).
2) Opening the 1st XL 2003 file in XL 2010 produces the error:
3) I’ve tried few changes to the ActiveSheet statements, e.g.; Application.ActiveSheet, Workbook.ActiveSheet, etc., with no luck!
I’ve also checked the VBA Editor::Tools::References
and found the checked references in XL 2010 to be identical to those checked in XL 2003 (obviously with Office 14.0 instead of Office 11.0)
4) It’s likely that numerous similar errors will be encountered, and I wonder if there’s a feature or a reference in XL 2010 I should check first before considering changes to the XL 2003 VBA code throughout.
Your expert advice would be greatly appreciated.
1) I have no choice but to transfer 10s of my (working perfectly) XL 2003 files to a new laptop running XL 2010 (full version).
2) Opening the 1st XL 2003 file in XL 2010 produces the error:
with the first ActiveSheet statement in the following abbreviated macro code (in a standard Module) highlighted:Run-time error ‘1004’:
Application-defined or object-defined error
Code:
'change chart XR scale depending on TIP or HUB region
[B]ActiveSheet.ChartObjects("Chart 1").Activate[/B]
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
If Range("J41") = "TIP" Then
.MinimumScale = 0.7
.MaximumScale = 1.05
Else
.MinimumScale = 0.15
.MaximumScale = 0.71
End If
End With
I’ve also checked the VBA Editor::Tools::References
and found the checked references in XL 2010 to be identical to those checked in XL 2003 (obviously with Office 14.0 instead of Office 11.0)
4) It’s likely that numerous similar errors will be encountered, and I wonder if there’s a feature or a reference in XL 2010 I should check first before considering changes to the XL 2003 VBA code throughout.
Your expert advice would be greatly appreciated.