Anyone know the VBA code for poping out an error message box?
I am creating a worksheet where the user can enter values to certain
cells before clicking the "run" command button, and when the button is
clicked, i want it to check wheather the cells that require input are
filled, if not, then a message box will pop out saying "error"
thanks
jay
Dave Peterson - 14 Nov 2006 21:22 GMT
Option Explicit
Sub testme()
dim myRng as range
with activesheet
set myrng = .range("a1,b3,c9,d12,f99")
end with
if myrng.cells.count <> application.counta(myrng) then
msgbox "Please complete all the cells!
exit sub
end if
'rest of code
End Sub
> Anyone know the VBA code for poping out an error message box?
> I am creating a worksheet where the user can enter values to certain
[quoted text clipped - 3 lines]
> thanks
> jay

Signature
Dave Peterson