Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
When you have the action on the same line as the If , there is no closing
End If required. As you have Else clauses, you need to structre it like so If (Range("D9").Value) < 0 Then Range("D9").ClearContents: UserForm6.Show ElseIf (Range("D9").Value) 125 Then Range("D9").ClearContents UserForm6.Show End If -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "dim" wrote in message ... Hi folks, Can someone please try and debug this code for me? ARGHHHH!! I just don't get it, why am I getting the compile error, there is obviously an 'If' so why is it saying there's not? If (Range("D9").Value) < 0 Then Range("D9").Select: Selection.ClearContents: UserForm6.Show ElseIf (Range("D9").Value) 125 Then Range("D9").Select: Selection.ClearContents: UserForm6.Show End If Thankyou for any advice. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile error:.......?? | Excel Discussion (Misc queries) | |||
help with this error-Compile error: cant find project or library | Excel Discussion (Misc queries) | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |