R
RGreen
Sub DEC_NY_AutoShape22_Click()
'
' AutoShape21_Click Macro
' Macro recorded 8/31/2009 by Rick Green
'
Application.ScreenUpdating = False
'
'Dim wb As Workbook
'On Error Resume Next
'Set wb = ActiveWorkbook.Worksheets("DEC")
'On Error GoTo 0
'If wb Is Nothing Then
' MsgBox "Year not active for this month."
'Else
ChDir _
"C:\Documents and Settings\RICK\My Documents\Calendar\Y2010"
Workbooks.Open Filename:= _
"C:\Documents and Settings\RICK\My Documents\Calendar\Y2010\DEC.xls"
Application.Run "DEC.xls!backtotop"
'End If
End Sub
I have a workbook named Months:
12 months and arrows which either refers to year 2009, 2010, or 2011. I
have not work on 2011 and only started to work on few of the 2010. If these
workbooks are not in the location specified by the macro, I want it to state
that workbook for that year has not been created and go back to the workbook
call "Months".
I have searched various references and thought this maybe the correct code,
apparently I am wrong.... Can someone please help me.
Thanks,
Rick
'
' AutoShape21_Click Macro
' Macro recorded 8/31/2009 by Rick Green
'
Application.ScreenUpdating = False
'
'Dim wb As Workbook
'On Error Resume Next
'Set wb = ActiveWorkbook.Worksheets("DEC")
'On Error GoTo 0
'If wb Is Nothing Then
' MsgBox "Year not active for this month."
'Else
ChDir _
"C:\Documents and Settings\RICK\My Documents\Calendar\Y2010"
Workbooks.Open Filename:= _
"C:\Documents and Settings\RICK\My Documents\Calendar\Y2010\DEC.xls"
Application.Run "DEC.xls!backtotop"
'End If
End Sub
I have a workbook named Months:
12 months and arrows which either refers to year 2009, 2010, or 2011. I
have not work on 2011 and only started to work on few of the 2010. If these
workbooks are not in the location specified by the macro, I want it to state
that workbook for that year has not been created and go back to the workbook
call "Months".
I have searched various references and thought this maybe the correct code,
apparently I am wrong.... Can someone please help me.
Thanks,
Rick