#1   Report Post  
Posted to microsoft.public.word.newusers
bgomezesthela bgomezesthela is offline
external usenet poster
 
Posts: 5
Default Combo Boxes

I have no idea of what i am doing wrong but.. I have 2 comboboxes (combobox1
and ComboBox2) I have this so far:

Private Sub ComboBox1_Change()
ComboBox1.AddItem "New User"
ComboBox1.AddItem "Change User"
End Sub

Private Sub ComboBox2_Change()
ComboBox2.AddItem "Audit/Auditors (External Internal)"
ComboBox2.AddItem "Ben Admin/BA Director"
ComboBox2.AddItem "Ben Admin/BA Supervisor"
ComboBox2.AddItem "Ben Admin/Ben Calc/Death/Enrollment Team"
ComboBox2.AddItem "Ben Admin / Disability"
ComboBox2.AddItem "Ben Admin / Drop / DRO"
ComboBox2.AddItem "Ben Admin/Employer Services"
ComboBox2.AddItem "Ben Admin/Health Admin"
ComboBox2.AddItem "Ben Admin/Imaging/Records Distrib"
ComboBox2.AddItem "Ben Admin/Special Projects"
ComboBox2.AddItem "IS/Administration"
ComboBox2.AddItem "IS/Business Analyst"
ComboBox2.AddItem "IS/Data Analyst"
ComboBox2.AddItem "IS/IT Director"
ComboBox2.AddItem "Finance Admin / CFO"
ComboBox2.AddItem "Finance Admin/Financial Administration"
ComboBox2.AddItem "Finance Admin/Financial Reporting"
ComboBox2.AddItem "Finance Admin / Payroll"
ComboBox2.AddItem "Legal/DRO/Disability"
ComboBox2.AddItem "Legal/General"
ComboBox2.AddItem "Member Services/Call Center-Reception"
ComboBox2.AddItem "Member Services / Counseling"
ComboBox2.AddItem "Member Services / Director"
End Sub

When I try my form by choosing one of the options on any of the two boxes
all the entries duplicate automatically... Why is doing this?
Can someone help me please..
  #2   Report Post  
Posted to microsoft.public.word.newusers
Reitanos Reitanos is offline
external usenet poster
 
Posts: 109
Default Combo Boxes

There is a group called microsoft.public.word.vba.userforms that might
be a more appropriate place to post this.

I think your issue might be that you set all the options using the
change event (ie every time you make a selection and change the value
it will trigger the event and rebuild the list). It might be better to
have a macro that draws a form (with userform1.Show) after defining
the two combo boxes.

On Dec 30, 1:58*pm, bgomezesthela
wrote:
I have no idea of what i am doing wrong but.. I have 2 comboboxes (combobox1
and ComboBox2) I have this so far:

Private Sub ComboBox1_Change()
ComboBox1.AddItem "New User"
ComboBox1.AddItem "Change User"
End Sub

Private Sub ComboBox2_Change()
ComboBox2.AddItem "Audit/Auditors (External Internal)"
ComboBox2.AddItem "Ben Admin/BA Director"
ComboBox2.AddItem "Ben Admin/BA Supervisor"
ComboBox2.AddItem "Ben Admin/Ben Calc/Death/Enrollment Team"
ComboBox2.AddItem "Ben Admin / Disability"
ComboBox2.AddItem "Ben Admin / Drop / DRO"
ComboBox2.AddItem "Ben Admin/Employer Services"
ComboBox2.AddItem "Ben Admin/Health Admin"
ComboBox2.AddItem "Ben Admin/Imaging/Records Distrib"
ComboBox2.AddItem "Ben Admin/Special Projects"
ComboBox2.AddItem "IS/Administration"
ComboBox2.AddItem "IS/Business Analyst"
ComboBox2.AddItem "IS/Data Analyst"
ComboBox2.AddItem "IS/IT Director"
ComboBox2.AddItem "Finance Admin / CFO"
ComboBox2.AddItem "Finance Admin/Financial Administration"
ComboBox2.AddItem "Finance Admin/Financial Reporting"
ComboBox2.AddItem "Finance Admin / Payroll"
ComboBox2.AddItem "Legal/DRO/Disability"
ComboBox2.AddItem "Legal/General"
ComboBox2.AddItem "Member Services/Call Center-Reception"
ComboBox2.AddItem "Member Services / Counseling"
ComboBox2.AddItem "Member Services / Director"
End Sub

When I try my form by choosing one of the options on any of the two boxes
all the entries duplicate automatically... Why is doing this?
Can someone help me please..


  #3   Report Post  
Posted to microsoft.public.word.newusers
alborg alborg is offline
external usenet poster
 
Posts: 67
Default Combo Boxes

Hi bgo:

When you work with UserForms, you sent up the .AddItem method when the
UserForm is initiated. When you click on any blank area of a UserForm you end
up with the Initialize Event:
'------------------------------------------------
Private Sub UserForm_Initialize()
On Error Resume Next
With ComboBox2
.AddItem "Audit/Auditors (External Internal)"
.AddItem "Ben Admin/BA Director"
.AddItem "Ben Admin/BA Supervisor"
.AddItem "Ben Admin/Ben Calc/Death/Enrollment Team"
.AddItem "Ben Admin / Disability"
.AddItem "Ben Admin / Drop / DRO"
.AddItem "Ben Admin/Employer Services"
.AddItem "Ben Admin/Health Admin"
.AddItem "Ben Admin/Imaging/Records Distrib"
.AddItem "Ben Admin/Special Projects"
.AddItem "IS/Administration"
.AddItem "IS/Business Analyst"
.AddItem "IS/Data Analyst"
.AddItem "IS/IT Director"
.AddItem "Finance Admin / CFO"
.AddItem "Finance Admin/Financial Administration"
.AddItem "Finance Admin/Financial Reporting"
.AddItem "Finance Admin / Payroll"
.AddItem "Legal/DRO/Disability"
.AddItem "Legal/General"
.AddItem "Member Services/Call Center-Reception"
.AddItem "Member Services / Counseling"
.AddItem "Member Services / Director"
End With

etc etc etc

End Sub
'------------------------------------------------

I rarely use the Change Event, because if you place code like:
'------------------------------------------------
Private Sub ComboBox1_Change()
[TextBox1] = ComboBox1.Value
End Sub
'------------------------------------------------
The textbox will now refresh until the end user clicks on the form, which is
annoying. Instead, use the Click Event:
'------------------------------------------------
Private Sub ComboBox1_Click()
[TextBox1] = ComboBox1.Value
End Sub
'------------------------------------------------
To get around this problem...

Regards,
Al

Now

"bgomezesthela" wrote:

I have no idea of what i am doing wrong but.. I have 2 comboboxes (combobox1
and ComboBox2) I have this so far:

Private Sub ComboBox1_Change()
ComboBox1.AddItem "New User"
ComboBox1.AddItem "Change User"
End Sub

Private Sub ComboBox2_Change()
ComboBox2.AddItem "Audit/Auditors (External Internal)"
ComboBox2.AddItem "Ben Admin/BA Director"
ComboBox2.AddItem "Ben Admin/BA Supervisor"
ComboBox2.AddItem "Ben Admin/Ben Calc/Death/Enrollment Team"
ComboBox2.AddItem "Ben Admin / Disability"
ComboBox2.AddItem "Ben Admin / Drop / DRO"
ComboBox2.AddItem "Ben Admin/Employer Services"
ComboBox2.AddItem "Ben Admin/Health Admin"
ComboBox2.AddItem "Ben Admin/Imaging/Records Distrib"
ComboBox2.AddItem "Ben Admin/Special Projects"
ComboBox2.AddItem "IS/Administration"
ComboBox2.AddItem "IS/Business Analyst"
ComboBox2.AddItem "IS/Data Analyst"
ComboBox2.AddItem "IS/IT Director"
ComboBox2.AddItem "Finance Admin / CFO"
ComboBox2.AddItem "Finance Admin/Financial Administration"
ComboBox2.AddItem "Finance Admin/Financial Reporting"
ComboBox2.AddItem "Finance Admin / Payroll"
ComboBox2.AddItem "Legal/DRO/Disability"
ComboBox2.AddItem "Legal/General"
ComboBox2.AddItem "Member Services/Call Center-Reception"
ComboBox2.AddItem "Member Services / Counseling"
ComboBox2.AddItem "Member Services / Director"
End Sub

When I try my form by choosing one of the options on any of the two boxes
all the entries duplicate automatically... Why is doing this?
Can someone help me please..

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo boxes bgomezesthela Microsoft Word Help 1 December 22nd 08 09:58 AM
Is it possible to expand size of combo boxes? She11eyS Microsoft Word Help 2 July 4th 08 04:27 AM
User Forms and Combo boxes in Work Kay Microsoft Word Help 2 December 17th 05 01:47 AM
Multiple combo boxes in Word weim10 Microsoft Word Help 0 September 16th 05 08:18 AM
combo boxes weim10 Microsoft Word Help 1 September 15th 05 09:28 AM


All times are GMT +1. The time now is 11:49 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"