Getting a type mismatch error on the if statement line, i am not sure why
any help would be grateful!
Sub mastermod()
path1 = thisworkbook.worksheets("FilePath").range("D5")
path2 = thisworkbook.worksheets("FilePath").range("D7")
path3 = thisworkbook.worksheets("FilePath").range("D10")
if path1 and path2 and path3 <> "" then
'this code below is modules that have code in them
test1
test2
else
msgbox "Blank field!"
END IF
End sub
any help would be grateful!
Sub mastermod()
path1 = thisworkbook.worksheets("FilePath").range("D5")
path2 = thisworkbook.worksheets("FilePath").range("D7")
path3 = thisworkbook.worksheets("FilePath").range("D10")
if path1 and path2 and path3 <> "" then
'this code below is modules that have code in them
test1
test2
else
msgbox "Blank field!"
END IF
End sub