Hi ,
Here i have one problem in coding.
Iam using ilogic to modify the boxes:
I have a one rectangular box in that box again small rectangular boxes in this my problem is when iam giving value for smaller boxes(all boxes height) more than outer box how it will show the message box and how to stop the code.
d1=big box height
d2,d3,d4---small boxes height
I am writing code like this:
IF((d2+d3+d4)=<d1) then
Msg.box(give correct value)
end if
here it's showing the message and it,s not stoping the program.
Thanks & Regards,
LINUS KOTTE
Do you have any more code after the you do the check and display a message? If so change your code to only do the rest if the check is valid.
If (( d2 + d3 + d4 ) =< d1 ) Then
MsgBox("give correct value")
Else
<<< Put the rest of your code here >>>
End If <<< Don't put anymore code after this
or this code:
If (( d2 + d3 + d4 ) =< d1 ) Then MsgBox("give correct value") Exit Sub End if
'rest of your code
the difference is very small but you don't have to remember about "End if" at the end of the rule.