Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Quick If Question

I just want to have an If statement so that...
If textbox1 is empty to do nothing, if Textbox one has a value you i
it, then run the code

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default Quick If Question

Not sure what you mean by
if Textbox one has a value you in it


If you mean "If Textbox1 is not empty", then
If Textbox1.Text < "" Then
' your code here
End If

If you mean Textbox1 has a specific word or string in it, then
If Textbox1.Text = "yourstringhere" Then
' your code here
End If

In both cases, if Textbox1.Text is empty, the If will be bypassed. If you
want to do something if it's empty, then in either If, put
' your code here
Else:
' other code if empty
End If

HTH
Ed

"RPIJG " wrote in message
...
I just want to have an If statement so that...
If textbox1 is empty to do nothing, if Textbox one has a value you in
it, then run the code.


---
Message posted from http://www.ExcelForum.com/



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
Quick Question Dave Excel Discussion (Misc queries) 3 February 18th 09 06:00 PM
Quick Question Kory Excel Discussion (Misc queries) 1 July 21st 07 09:46 AM
quick question riggi Excel Discussion (Misc queries) 4 January 31st 07 06:11 AM
Quick Question Brian Hamilton Excel Worksheet Functions 2 October 27th 06 05:51 PM
Quick little question ben simpson Excel Discussion (Misc queries) 3 April 11th 06 02:35 PM


All times are GMT +1. The time now is 01:16 PM.

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"