Thread: VBA Info
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default VBA Info

Sub Macro1()
If cboDepartment.Value = "" Then
MsgBox "Has no Value Exit Macro..."
Exit Sub
Else
MsgBox "Has Value Run Macro..."
End If

End Sub

"LT" wrote:

Hi everyone. Somehow I think I should know this but the answer is
just not stepping up.

In Excel for example I know to use this formula for finding out if a
cell has data in it. =IF(F18<"","Yes","No")

What is the syntax for doing this VBA?

if cboDepartment (HAS a value) then do this, otherwise do this.

Thanks in advance!

-LT