haddy27
06-15-2007, 08:34 AM
I am writing a bit of code that uses different subroutines.
I only want one of the subroutines to execute if a given criteria is met, in my case, if cell is empty.
The code I have so far is below, but it's not working for me:
Sub ReloadAdditionalIncome()
Sheets("Reload Data").Select
If Range("A4") = "" Then Exit Sub
'reload additional income data
Sheets("Reload Data").Select
Range("A4:Y13").Copy
Sheets("USER INPUTS - Additional Income").Select
Range("F16").PasteSpecial Paste:=xlPasteValues
Sheets("USER INPUTS - Additional Income").Select
Range("F16").Select
end sub
I've tried the coding if range("A4") = "" then go to NextSubRoutine but this doesn't seem to be helping either.
This is the final stumbling block for this job so any help would be greatly appreciated.
Thanks
I only want one of the subroutines to execute if a given criteria is met, in my case, if cell is empty.
The code I have so far is below, but it's not working for me:
Sub ReloadAdditionalIncome()
Sheets("Reload Data").Select
If Range("A4") = "" Then Exit Sub
'reload additional income data
Sheets("Reload Data").Select
Range("A4:Y13").Copy
Sheets("USER INPUTS - Additional Income").Select
Range("F16").PasteSpecial Paste:=xlPasteValues
Sheets("USER INPUTS - Additional Income").Select
Range("F16").Select
end sub
I've tried the coding if range("A4") = "" then go to NextSubRoutine but this doesn't seem to be helping either.
This is the final stumbling block for this job so any help would be greatly appreciated.
Thanks