PC Review


Reply
Thread Tools Rate Thread

Combo Box Selection Changes w/o Input

 
 
BJ
Guest
Posts: n/a
 
      5th Sep 2008
Hello

I've got two combo boxes that work with each other. The first allows the
user to select a pricing matrix group (there are 5 total) and the second
allows the user to select a contract term (each group has unique terms) which
selects the appropriate pricing matrix. The problem I am encountering is
that when I've made changes to the workbook (e.g., adding a new worksheet or
when the autorecover function runs) the second combo box reverts to a blank
and the pricing is lost. This requires the user to reenter the contract term
to get the pricing back. I can't figure out why its happening.

Here is my code (abbreviated ...) :

Private Sub ComboBox1_Change()
If ComboBox1.Value = "GroupA" Then
ComboBox2.Value = ""
ComboBox2.ListFillRange = "GroupA_Terms"
End If
If ComboBox1.Value = "GroupB" Then
ComboBox2.ListFillRange = "GroupB_Terms"
End If
....

End Sub

Private Sub ComboBox2_Change()
If ComboBox1.Value = "GroupA" Then
Sheets("Rates").Range("GroupA_Matrix").Copy
Sheets("Assumptions").Range("A29").PasteSpecial Paste:=xlPasteValues,
Transpose:=False
Application.CutCopyMode = False
....
End Sub

If I remove the ... ComboBox2.Value = "" ... line I don't have the problem.
However, if the user switches the ComboBox1 value, the term doesn't change
until they select a new one. This results in error messages as the formulas
can't find the term they have selected.

Any thoughts?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying input fields based on a combo box selection ace Microsoft Access Form Coding 5 4th Jun 2009 07:44 AM
Combo Box selection only shows bound column info after selection made. Coby Microsoft Excel Programming 1 18th Oct 2007 02:04 AM
Text box input based on a combo box selection Opal Microsoft Access Form Coding 10 11th Oct 2007 03:01 AM
using selection from combo box as input to a 2d combo box tonyaims Microsoft Access Forms 13 10th Sep 2004 05:56 PM
Make input selection access a table dependent upon another input =?Utf-8?B?ZGFiMTQ3Nw==?= Microsoft Access VBA Modules 4 4th Sep 2004 12:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:50 PM.