#1   Report Post  
Posted to microsoft.public.excel.programming
LT LT is offline
external usenet poster
 
Posts: 25
Default VBA Info

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA Info

Hi LT,

One way:

If Not IsEmpty(Range("A1")) Then
;do something
End If


---
Regards,
Norman


"LT" wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
LT LT is offline
external usenet poster
 
Posts: 25
Default VBA Info

On May 16, 11:46 am, "Norman Jones"
wrote:
Hi LT,

One way:

If Not IsEmpty(Range("A1")) Then
;do something
End If

---
Regards,
Norman

"LT" wrote in message

oups.com...



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- Hide quoted text -


- Show quoted text -


Thanks for the reply Mike and Norman! Much appreciated!
-LT

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cell info and info in range of cells on new entry abc[_2_] Excel Discussion (Misc queries) 5 February 15th 10 08:21 PM
Copied info from Excel worksheet, but pasted info won't work in fo KRISTENV Excel Discussion (Misc queries) 3 January 8th 09 03:13 PM
Copy info into empty cells below info, until finds cell with new d Fat Jack Utah Excel Discussion (Misc queries) 3 November 16th 08 08:34 PM
need help w/ macro prompting with info and pasting the info based on user input drgka55 Excel Programming 8 August 28th 06 06:05 PM
Link info in one cell to info in several cells in another column (like a database) hansdiddy Excel Discussion (Misc queries) 1 February 22nd 06 02:27 AM


All times are GMT +1. The time now is 06:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"