Help! Multiple ActiveX ComboBox's w/several items - Is it possible to shorten?

ocnmel

New Member
Joined
Feb 28, 2014
Messages
44
I have multiple ComboBoxes (ie., 2137-2150) with attendance codes and I was wondering if there is anyway to shorten?

Cross-posted: http://www.excelforum.com/excel-pro...ms-is-it-possible-to-shorten.html#post3948039

Private Sub ComboBox2137_Click()
ComboBox2137.Text = Trim(Split(ComboBox2137.List(ComboBox2137.ListIndex), "-")(0))
End Sub

With Sheet1.ComboBox2137
.AddItem " BD - LABOR/MANAGEMENT"
.AddItem " BK - GRIEVANCE AND APPEALS"
.AddItem " CB - TRAVEL COMPENSATORY TIME EARNED"
.AddItem " CC - COMPENSATORY CALLBACK"
.AddItem " CD - CREDIT HOURS EARNED"
.AddItem " CE - TRAVEL COMPENSATORY TIME TAKEN"
.AddItem " CN - CREDIT HOURS TAKEN"
.AddItem " CT - COMPENSATORY TIME TAKEN"
.AddItem " DA - BIRTH OF SON/DAUGHTER OR CARE OF NEWBORN"
.AddItem " DB - ADOPTION OR FOSTER CARE"
.AddItem " DC - CARE FOR SPOUSE, SON, DAUGHTER, OR PARENT WITH SERIOUS HEALTH CONDITION"
.AddItem " DD - SERIOUS HEALTH CONDITION OF EMPLOYEE"
.AddItem " DE - FEFFL FAMILY CARE/BEREAVEMENT"
.AddItem " DF - ADOPTION RELATED PURPOSES"
.AddItem " DM - WOUNDED VETERAN"
.AddItem " HC - HOLIDAY CALLBACK"
.AddItem " HF - HOLIDAY WORK - FIRST SHIFT (FWS EMPLOYEE)"
.AddItem " HG - HOLIDAY WORK - (GS EMPLOYEE)"
.AddItem " HS - HOLIDAY WORK - SECOND SHIFT (FWS EMPLOYEE)"
.AddItem " HT - HOLIDAY WORK - THIRD SHIFT (FWS EMPLOYEE)"
.AddItem " KA - LEAVE WITHOUT PAY (LWOP)"
.AddItem " KB - SUSPENSION"
.AddItem " KC - ABSENCE WITHOUT PAY (AWOL)"
.AddItem " KD - OFFICE OF WORKERS COMPENSATION PROGRAMS (OWCP)"
.AddItem " KE - FURLOUGH"
.AddItem " KG - MILITARY FURLOUGH(LWOP) - CALLED TO ACTIVE DUTY"
.AddItem " LA - ANNUAL LEAVE"
.AddItem " LB - ADVANCED ANNUAL LEAVE"
.AddItem " LC - COURT LEAVE"
.AddItem " LG - ADVANCED SICK LEAVE"
.AddItem " LH - HOLIDAY LEAVE"
.AddItem " LM - MILITARY LEAVE"
.AddItem " LN - ADMINISTRATIVE LEAVE"
.AddItem " LS - SICK LEAVE"
.AddItem " LT - TRAUMATIC INJURY (CONTINUATION OF PAY (COP))"
.AddItem " LU - DAY OF INJURY"
.AddItem " ND - NIGHT DIFFERENTIAL (GS EMPLOYEE)"
.AddItem " OC - OVERTIME CALLBACK"
.AddItem " OS - OVERTIME SCHEDULED"
.AddItem " OU - OVERTIME UNSCHEDULED"
.AddItem " RG - REGULAR (GS EMPLOYEE)"
.AddItem " RF - REGULAR - FIRST SHIFT (FWS EMPLOYEE)"
.AddItem " RS - REGULAR - SECOND SHIFT (FWS EMPLOYEE)"
.AddItem " RT - REGULAR - THIRD SHIFT (FWS EMPLOYEE)"
.AddItem " RN - REGULAR - PAID NOT WORKED (FIREFIGHTER)"
.AddItem " RW - REGULAR - AGENCY TRAINING (FIREFIGHTER)"
End With
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Similar threads

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top