excel vba - Check two empty cells in VBA -
excel vba - Check two empty cells in VBA -
i have been trying check if 2 cells empty. know how check 1 cell can't figure out how check 2 separate cells. 1 of ways have tried. when run it, check f17 not f12, if switch numbers check f12. appreciate help. give thanks you
sub button11verifyfilepathpresent_click() dim rcell range on error goto errorhandle set rcell = range("f17", "f12") if isempty(rcell) msgbox "please select files" ' "cell " & rcell.address & " empty." end if beforeexit: set rcell = nil exit sub errorhandle: msgbox err.description & " error in procedure cellcheck." resume beforeexit end sub
consider:
if range("f17") & range("f12") = "" if concatenation null, both must null.
excel-vba
Comments
Post a Comment