Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, using XL 2000
I have 4 comboboxes, named CB1..CB4 When each is selected, an 8 character part number is dynamically built. Each CB holds 2 characters, so my part number ouptut into Label1, needs to take the string format of 'A1B2C3D4' This is the tricky part, if a user changes any CB, I need the characters in the respective position to dynamically change. Example; if CB2 is changed from 'B2' to 'B8' I need the part number output string to change accordingly; A1B8C3D4 Hope this make some sense. Thanks, Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
hope this helps! if you use this code for your combo boxes, i dont know what you want to reference the comboboxes to though! Private Sub CB1_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB2_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB3_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB4_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub thank you, Robert Couchman |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Private Sub CB1_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB2_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB3_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB4_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub sorry forgot to mention that i was updating a textbox (TB1) and not a label, but im sure that can be easily changed! Thank you, Robert Couchman |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your solution.
Paul -----Original Message----- Private Sub CB1_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB2_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB3_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub Private Sub CB4_afterupdate() TB1 = CB1 + CB2 + CB3 + CB4 End Sub sorry forgot to mention that i was updating a textbox (TB1) and not a label, but im sure that can be easily changed! Thank you, Robert Couchman . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
If you 4 cbo's have their output linked a cell each, then your part number would just be: =A1 & A2 & A3 & A4 Or if they are on a userform they in each _Change event call MadePartNumber Private Function MadePartNumber () As String MadePartNumber=ComboBox1.Text & ComboBox2.Text & ComboBox3.Text & ComboBox4.Text End Function NickHK "Paul" wrote in message ... Hi, using XL 2000 I have 4 comboboxes, named CB1..CB4 When each is selected, an 8 character part number is dynamically built. Each CB holds 2 characters, so my part number ouptut into Label1, needs to take the string format of 'A1B2C3D4' This is the tricky part, if a user changes any CB, I need the characters in the respective position to dynamically change. Example; if CB2 is changed from 'B2' to 'B8' I need the part number output string to change accordingly; A1B8C3D4 Hope this make some sense. Thanks, Paul |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your solution.
Paul -----Original Message----- Paul, If you 4 cbo's have their output linked a cell each, then your part number would just be: =A1 & A2 & A3 & A4 Or if they are on a userform they in each _Change event call MadePartNumber Private Function MadePartNumber () As String MadePartNumber=ComboBox1.Text & ComboBox2.Text & ComboBox3.Text & ComboBox4.Text End Function NickHK "Paul" wrote in message ... Hi, using XL 2000 I have 4 comboboxes, named CB1..CB4 When each is selected, an 8 character part number is dynamically built. Each CB holds 2 characters, so my part number ouptut into Label1, needs to take the string format of 'A1B2C3D4' This is the tricky part, if a user changes any CB, I need the characters in the respective position to dynamically change. Example; if CB2 is changed from 'B2' to 'B8' I need the part number output string to change accordingly; A1B8C3D4 Hope this make some sense. Thanks, Paul . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Taking a workbook out of Data Tracking | Excel Worksheet Functions | |||
Vlookup only taking first line of data | Excel Discussion (Misc queries) | |||
Taking Certian Data only from 2 Spreadsheets | New Users to Excel | |||
Taking data from another worksheet and converting | Excel Worksheet Functions | |||
Anyone successful taking data into Quickbooks? | Excel Programming |