Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find End of String
Hi, I have a form that has two text box's. Next to each of these tex box's I have a checkbox. I want to allow the user to put a check nex to the text box's values he wants to include in a thrid textbox o another form. If there are more than one checkbox checked then I want comma between each value. Here is generically what I'm trying to do. Private Sub CommandButtonENGDescriptionNext_Click() If Me.CheckBoxENGID.Value = True Then Me.TextBoxDescriptionPageDescription.Value = Me.TextBoxEngineID.Value End If This is where I get stuck. What I want to happen is this: Then If Me.CheckBoxENGAccessoriesIncluded.Value = True Then Append Me.TextBoxDescriptionPageDescription.Value = ", " Me.ComboBoxAccessoriesYesNo.Value to the end of the string. End If End Sub How do I do this? Thanks Jod -- ssjod ----------------------------------------------------------------------- ssjody's Profile: http://www.excelforum.com/member.php...fo&userid=3339 View this thread: http://www.excelforum.com/showthread.php?threadid=56604 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find End of String
Private Sub CommandButtonENGDescriptionNext_Click()
If Me.CheckBoxENGID.Value = True Then Me.TextBoxDescriptionPageDescription.Value = Me.TextBoxEngineID.Value if Me.CheckBoxENGAccessoriesIncluded.Value = True Then Me.TextBoxDescriptionPageDescription.Value = _ Me.TextBoxDescriptionPageDescription.Value & _ "," & Me.ComboBoxAccessoriesYesNo.Value End If Else if Me.CheckBoxENGAccessoriesIncluded.Value = True Then Me.TextBoxDescriptionPageDescription.Value = _ Me.ComboBoxAccessoriesYesNo.Value end if End if HTH Die_Another_Day Then If Me.CheckBoxENGAccessoriesIncluded.Value = True Then Append Me.TextBoxDescriptionPageDescription.Value = ", " & Me.ComboBoxAccessoriesYesNo.Value to the end of the string. End If End Sub ssjody wrote: Hi, I have a form that has two text box's. Next to each of these text box's I have a checkbox. I want to allow the user to put a check next to the text box's values he wants to include in a thrid textbox on another form. If there are more than one checkbox checked then I want a comma between each value. Here is generically what I'm trying to do. Private Sub CommandButtonENGDescriptionNext_Click() If Me.CheckBoxENGID.Value = True Then Me.TextBoxDescriptionPageDescription.Value = Me.TextBoxEngineID.Value End If This is where I get stuck. What I want to happen is this: Then If Me.CheckBoxENGAccessoriesIncluded.Value = True Then Append Me.TextBoxDescriptionPageDescription.Value = ", " & Me.ComboBoxAccessoriesYesNo.Value to the end of the string. End If End Sub How do I do this? Thanks Jody -- ssjody ------------------------------------------------------------------------ ssjody's Profile: http://www.excelforum.com/member.php...o&userid=33398 View this thread: http://www.excelforum.com/showthread...hreadid=566040 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find End of String
Private Sub CommandButtonENGDescriptionNext_Click()
With Me TextBoxDescriptionPageDescription.Text = "" If .CheckBoxEngID.Value = True Then .TextBoxDescriptionPageDescription.Value = _ .TextBoxEngineID.Value End If If .CheckBoxENGAccessoriesIncluded.Value = True Then If .TextBoxDescriptionPageDescription.Value < "" Then .TextBoxDescriptionPageDescription.Value = _ .TextBoxDescriptionPageDescription.Value & ", " End If .TextBoxDescriptionPageDescription.Value = _ .TextBoxDescriptionPageDescription.Value & _ .TextBoxENGAccessoriesIncluded.Text End If End With End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "ssjody" wrote in message ... Hi, I have a form that has two text box's. Next to each of these text box's I have a checkbox. I want to allow the user to put a check next to the text box's values he wants to include in a thrid textbox on another form. If there are more than one checkbox checked then I want a comma between each value. Here is generically what I'm trying to do. Private Sub CommandButtonENGDescriptionNext_Click() If Me.CheckBoxENGID.Value = True Then Me.TextBoxDescriptionPageDescription.Value = Me.TextBoxEngineID.Value End If This is where I get stuck. What I want to happen is this: Then If Me.CheckBoxENGAccessoriesIncluded.Value = True Then Append Me.TextBoxDescriptionPageDescription.Value = ", " & Me.ComboBoxAccessoriesYesNo.Value to the end of the string. End If End Sub How do I do this? Thanks Jody -- ssjody ------------------------------------------------------------------------ ssjody's Profile: http://www.excelforum.com/member.php...o&userid=33398 View this thread: http://www.excelforum.com/showthread...hreadid=566040 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find End of String
result = if(not(isempty(result));result & ", ";"") & yourstring
"ssjody" wrote: Hi, I have a form that has two text box's. Next to each of these text box's I have a checkbox. I want to allow the user to put a check next to the text box's values he wants to include in a thrid textbox on another form. If there are more than one checkbox checked then I want a comma between each value. Here is generically what I'm trying to do. Private Sub CommandButtonENGDescriptionNext_Click() If Me.CheckBoxENGID.Value = True Then Me.TextBoxDescriptionPageDescription.Value = Me.TextBoxEngineID.Value End If This is where I get stuck. What I want to happen is this: Then If Me.CheckBoxENGAccessoriesIncluded.Value = True Then Append Me.TextBoxDescriptionPageDescription.Value = ", " & Me.ComboBoxAccessoriesYesNo.Value to the end of the string. End If End Sub How do I do this? Thanks Jody -- ssjody ------------------------------------------------------------------------ ssjody's Profile: http://www.excelforum.com/member.php...o&userid=33398 View this thread: http://www.excelforum.com/showthread...hreadid=566040 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find String in another string - only between spaces | Excel Worksheet Functions | |||
Find Many String options in ONE String | Excel Worksheet Functions | |||
search a string withing a string : find / search hangs | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming | |||
find a string inside another string | Excel Programming |