Hi,
The basic problem for me is I don't know much about VBA or macros, as I am into PeopleSoft. When I am opening an excel report which is generated by a peoplesoft application. I am getting an error after I enable the macros and hit no to another warning to make any changes to workbook, I am immediately get this error,
like
Run Time Error:9
Sub-Script out of range
This is the Code where it is showing when I tried to debug it.
'* This function hides the current quarter column when the worksheet is opened if the AsOfDate month is not a quarter-ending month.
'***********************************************************************
Sub Auto_Open()
If Month(Worksheets("Report").Range("AsOfDate").Value) Mod 3 > 0 Then
HideCurrentQuarter
End If
End Sub
As to what i understood is that it works properly for 3,6,9,12 months as they are the quarter ending months. But it is not working properly for other months....like oct, nov..etc. what should i do to make it work properly. So please someody who knows it better help me out in this!!!!!
Your Time and Consideration would be appreciated.
Thanks
Soumya
JulieD - 30 Oct 2004 14:42 GMT
Hi
what do you want to happen? if you don't want the quarter hidden then just
delete the macro - if you want the quarter hidden no matter what month it is
then delete the IF and END IF lines.
Cheers
JulieD
> Hi,
> The basic problem for me is I don't know much about VBA or macros, as I am
[quoted text clipped - 33 lines]
> http://www.officekb.com/Uwe/Abuse.aspx?aid=e116502162274f46bfb4ce441d4b2b10
> *****************************************