LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default If texbox value begins with "E" then send to another sheet.

I have set up a userform which takes data from about 50 textboxes and enters
it into 7 different worksheets. What I need is when a value in the
tbProjectNumber textbox begins with "E" (Upper or lower case) to send the
information to an 8th worksheet as well as the other 7 worksheets. Here is a
portion of my code and thank you in advance for your help.

Private Sub SaveButton_Click()
' Activate Sheet1
Sheet1.Activate
' Check to see if project number is already entered
If Not Sheet1.Columns(1).Find(tbProjectNumber.Value) Is Nothing Then
ufAlreadyEntered.Show
If Sheet1.Columns(1).Find(tbProjectNumber.Value) Is Nothing Then
' Determine the next empty row
NextRow = _
Application.WorksheetFunction.CountA(Range("A:A")) + 1
' Transfer to Sheet1(Project Type)
Cells(NextRow, 1) = tbProjectNumber.Text
Cells(NextRow, 2) = tbAEName.Text
Cells(NextRow, 3) = tbSiteOwnerName.Text
Cells(NextRow, 4) = tbPGLead.Text
Cells(NextRow, 5) = cbProjectType.Text
Cells(NextRow, 6) = cbProjectCategory.Text
' Activate Sheet8
Sheet8.Activate
' Transfer to Sheet8(Experience List)
If tbProjectNumber.Value = "E******" Then
Cells(NextRow, 1) = tbProjectNumber.Value
Cells(NextRow, 2) = tbSiteOwnerName.Text
Cells(NextRow, 3) = tbSiteLocation.Text
Cells(NextRow, 4) = tbSiteName.Text
Cells(NextRow, 5) = tbSiteUnitNumber.Text
Cells(NextRow, 6) = cbApplication.Text
Cells(NextRow, 7) = tbQuantity.Text
Cells(NextRow, 8) = tbHPRating.Text
Cells(NextRow, 9) = tbOutputVoltage.Text
Cells(NextRow, 10) = tbDelivery.Text
Cells(NextRow, 11) = tbVFDType.Text
End If
' Set the controls for the next entry
tbProjectNumber.SetFocus
Sheet7.Activate
End If
End Sub
 
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
Signature missing when "send to" "mail recipient" Jim Tortorelli Excel Discussion (Misc queries) 2 September 21st 07 05:19 PM
How do I cancel the "Send this Sheet" option? John @ Spray Excel Discussion (Misc queries) 1 January 31st 07 07:35 PM
Sorting text that begins with "the" or "a" kcg727 Excel Discussion (Misc queries) 2 February 25th 06 10:44 PM
Override "Send this Sheet" Priya[_4_] Excel Programming 1 February 6th 06 02:16 PM
Backup to specific folder if workbook names begins with "NSR" or "MAC" GregR Excel Programming 3 May 6th 05 12:24 AM


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

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

About Us

"It's about Microsoft Excel"