Mega Code Archive

 
Categories / VisualBasic Script / Data Type
 

Uses VBAs handy TypeName function to determine the data type of the FormulaTest variable

Sub hasFormula()     Dim FormulaTest As Variant     FormulaTest = range("A1:A2").hasFormula     If TypeName(FormulaTest) = "Null" Then MsgBox "Mixed!" End Sub