D
Desiree
I am attempting to run a multi-step If-Then macro. Please see below, it
never gets past the first If statement line.
Sub Forecast()
'
' Forecast Macro
' Macro recorded 07/27/2005 by D. Baron
'
'
If B5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Oct_Forecast"
ElseIf C5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Nov_Forecast"
ElseIf D5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Dec_Forecast"
ElseIf E5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Jan_Forecast"
ElseIf F5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Feb_Forecast"
ElseIf G5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Mar_Forecast"
ElseIf H5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Apr_Forecast"
ElseIf I5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!May_Forecast"
ElseIf J5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Jun_Forecast"
ElseIf K5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Jul_Forecast"
ElseIf L5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Aug_Forecast"
ElseIf M5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Sep_Forecast"
End If
End Sub
never gets past the first If statement line.
Sub Forecast()
'
' Forecast Macro
' Macro recorded 07/27/2005 by D. Baron
'
'
If B5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Oct_Forecast"
ElseIf C5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Nov_Forecast"
ElseIf D5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Dec_Forecast"
ElseIf E5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Jan_Forecast"
ElseIf F5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Feb_Forecast"
ElseIf G5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Mar_Forecast"
ElseIf H5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Apr_Forecast"
ElseIf I5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!May_Forecast"
ElseIf J5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Jun_Forecast"
ElseIf K5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Jul_Forecast"
ElseIf L5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Aug_Forecast"
ElseIf M5 = G1 Then
Application.Run "'SSA Business Review Tool_rev4.xls'!Sep_Forecast"
End If
End Sub