A
AstroProg
The code below gives a Type Mismatch error on the .MinimumScale = startmonth
and the line afterward. This worked in Excel 2003 but gives the error in
Excel 2007. It appears you cannot use a string with the MinimumScale command.
Any ideas how to work around this? startmonth and stopmonth are dates such
as 01/01 and 01/31. Below is the VBA code.
Chart1.Activate
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = False
.MaximumScaleIsAuto = False
.MinimumScale = startmonth
.MaximumScale = endmonth
and the line afterward. This worked in Excel 2003 but gives the error in
Excel 2007. It appears you cannot use a string with the MinimumScale command.
Any ideas how to work around this? startmonth and stopmonth are dates such
as 01/01 and 01/31. Below is the VBA code.
Chart1.Activate
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = False
.MaximumScaleIsAuto = False
.MinimumScale = startmonth
.MaximumScale = endmonth