Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Taking Combobox data...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Taking Combobox data...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Taking Combobox data...


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Taking Combobox data...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Taking Combobox data...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Taking Combobox data...

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
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
Taking a workbook out of Data Tracking will Excel Worksheet Functions 0 April 17th 07 03:52 PM
Vlookup only taking first line of data Michael Dinning Excel Discussion (Misc queries) 6 June 23rd 06 01:12 PM
Taking Certian Data only from 2 Spreadsheets william4444 New Users to Excel 2 June 5th 06 01:14 PM
Taking data from another worksheet and converting Annerobbo Excel Worksheet Functions 2 November 9th 05 01:41 PM
Anyone successful taking data into Quickbooks? Brad[_13_] Excel Programming 0 December 18th 03 01:39 AM


All times are GMT +1. The time now is 11:25 PM.

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"