I have some code that I'd like to execute if the variable "Period" equals certain values - 1, 4, 7, or 10. If it doesn't = those values I want to skip the code and continue on to the next step. Currently, my code reads as such:
If period = 1 Or 4 Or 7 Or 10 Then
Workbooks.Open Filename:= _
"J:\Finance\Databases\fy" & sht_yr & "\Flash\PH" & Wk5 & ".DLV.xls"
End If
Am I missing something? When I run the macro it executes this code even if the variable does not = 1, 4, 7, or 10.
Thanks,
Bob
If period = 1 Or 4 Or 7 Or 10 Then
Workbooks.Open Filename:= _
"J:\Finance\Databases\fy" & sht_yr & "\Flash\PH" & Wk5 & ".DLV.xls"
End If
Am I missing something? When I run the macro it executes this code even if the variable does not = 1, 4, 7, or 10.
Thanks,
Bob