Hi all
I have created seven Named Ranges for use in formulae in following procedures and want to check that none of them is blank. I have tried variations of the following but have bugged out on the If Application.CountBlank line each time.
This arrangement causes a Compile error: expected Then or GoTo
.Range causes a run time error "Invalid number of arguments"
Any help to get me going is much appreciated.
Thanks & regards
Mark
I have created seven Named Ranges for use in formulae in following procedures and want to check that none of them is blank. I have tried variations of the following but have bugged out on the If Application.CountBlank line each time.
Code:
With Sheets("Parameters")
Range("G7").Name = "lMat"
Range("H7").Name = "hMat"
Range("G8").Name = "lAss"
Range("H8").Name = "hAss"
Range("G9").Name = "lEqu"
Range("H9").Name = "hEqu"
Range("G11").Name = "Prefix"
If Application.CountBlank Range(Array("lMat", "hMat", "lAss", "hAss", "lEqu", "hEqu", "Prefix")) = 0 Then
Call CheckForData
Else
MsgBox "Information missing from Parameters, please complete"
End If
End With
This arrangement causes a Compile error: expected Then or GoTo
.Range causes a run time error "Invalid number of arguments"
Any help to get me going is much appreciated.
Thanks & regards
Mark