Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Signature missing when "send to" "mail recipient" | Excel Discussion (Misc queries) | |||
How do I cancel the "Send this Sheet" option? | Excel Discussion (Misc queries) | |||
Sorting text that begins with "the" or "a" | Excel Discussion (Misc queries) | |||
Override "Send this Sheet" | Excel Programming | |||
Backup to specific folder if workbook names begins with "NSR" or "MAC" | Excel Programming |