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

I am wanting to have the values m or f to be inputted into textbox5. Iam
not sure of how to do this I have put a little code as I think will work but
I would also like to have a messagebox appear if any textbox is left blank
that they must have a value.



If Val(TextBox5.Text) = "m"

Thanks



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Textbox values

Thanks for that

Browie
"Snake Plissken" wrote in message
...

firstible:

if TextBox5.value = "m" then...


secondly - here is a sample code that helps to determine blank value of

any
textbox on a form

Dim oCtl As MSForms.Control

For Each oCtl In name_of_form.Controls
If TypeName(oCtl) = "TextBox" Then

if oCtl.Value = "" then
msgbox (oCtl.name & " has no value!")
end if
End If
Next oCtl



I am wanting to have the values m or f to be inputted into textbox5. Iam
not sure of how to do this I have put a little code as I think will work
but
I would also like to have a messagebox appear if any textbox is left
blank
that they must have a value.



If Val(TextBox5.Text) = "m"

Thanks






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Textbox values

Why not use a combobox, with those values, and the user can select from
them. You can check on some type of form exit whether a selection has been
made

If ComboBox1.ListIndex < 0 Then
'do something
End If


--
HTH

Bob Phillips

"browie" wrote in message
...
I am wanting to have the values m or f to be inputted into textbox5. Iam
not sure of how to do this I have put a little code as I think will work

but
I would also like to have a messagebox appear if any textbox is left blank
that they must have a value.



If Val(TextBox5.Text) = "m"

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Textbox values


firstible:

if TextBox5.value = "m" then...


secondly - here is a sample code that helps to determine blank value of any
textbox on a form

Dim oCtl As MSForms.Control

For Each oCtl In name_of_form.Controls
If TypeName(oCtl) = "TextBox" Then

if oCtl.Value = "" then
msgbox (oCtl.name & " has no value!")
end if
End If
Next oCtl



I am wanting to have the values m or f to be inputted into textbox5. Iam
not sure of how to do this I have put a little code as I think will work
but
I would also like to have a messagebox appear if any textbox is left
blank
that they must have a value.



If Val(TextBox5.Text) = "m"

Thanks




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
How do I add TextBox.values? WTG Excel Programming 4 February 28th 05 09:38 AM
How do I add TextBox.values? WTG Excel Discussion (Misc queries) 1 February 27th 05 08:25 PM
How do I add TextBox.values? WTG Excel Worksheet Functions 1 February 27th 05 08:22 PM
Initialize textbox values phreud[_20_] Excel Programming 4 July 2nd 04 05:18 PM
Adding up values of textbox in Userform Mark Excel Programming 3 April 25th 04 09:10 PM


All times are GMT +1. The time now is 07:21 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"