Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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
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
Find String in another string - only between spaces Nir Excel Worksheet Functions 9 November 2nd 06 11:31 AM
Find Many String options in ONE String Nir Excel Worksheet Functions 6 October 26th 06 07:13 AM
search a string withing a string : find / search hangs itarnak[_9_] Excel Programming 4 October 24th 05 03:19 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM
find a string inside another string MarkS Excel Programming 1 January 13th 04 02:55 AM


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