Hi,
Been trying for an hour. Goal is to have a user form (done) and the code will enter the data into cells when clicked (done). Now I want to place some logic so that if the value of some calculated cells (not cells where data is entered)after the data is entered and the sheet calculates is out of bounds, I want the form to either still be displayed or have the form redisplay retaining the other data. I tried IF stement as follows
B71 is an optional field so there are 2 calculations i am checking depending if B71 is >0 or not
If Sheets("Bob Calculator").Range("b71") = 0 Then
If Sheets("Bob Calculator").Range("b91") = " Pipe Length is Not OK" Then
Msg = "Pipe Diameter is too small for the length of pipe - Please reenter a larger Pipe"
Else
If Sheets("Bob Calculator").Range("b71") < 0 Then
Msg = "Invalid Boiler MBH entered- Please reenter"
Else
If Sheets("Bob Calculator").Range("b98") = " Pipe Length is Not OK" Then
Msg = "Pipe Diameter is too small for the length of pipe - Please reenter a larger Pipe"
End If
I placed it in the same code where the data is added and the code seems to freeze
Bookmarks