Multiple Case statements

davidausten

New Member
Joined
Sep 1, 2017
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
Im using a combo box to select the option. The thing I am having trouble with is that if you select the second case statement from the list (they are in this order in the combo box) it selects I2 and not I3. totally stumped.

VBA Code:
Private Sub ComboBox1_Change()
With ComboBox1

Select Case Decide

Case Me.ComboBox1.Value = "Flat_Payment"

Sheet1.Range("I2").Copy

Case Me.ComboBox1.Value = "Duplicate_Payment_Invoice"

Sheet1.Range("I3").Copy

Case Me.ComboBox1.Value = "Duplicate_Payment_Statement"

Sheet1.Range("I4").Copy

Case Me.ComboBox1.Value = "Tax"

Sheet1.Range("I5").Copy

Case Me.ComboBox1.Value = "Dispute_Tax"

Sheet1.Range("I6").Copy

Case Me.ComboBox1.Value = "Courtesy_Adjustment"

Sheet1.Range("I7").Copy

Case Me.ComboBox1.Value = "Added_Payment_to_Misdirected"

Sheet1.Range("I8").Copy

Case Me.ComboBox1.Value = "Transfer_Portion_of_Payment"

Sheet1.Range("I9").Copy

Case Me.ComboBox1.Value = "Transfer_Payment_Auto_Lockbox"

Sheet1.Range("I10").Copy

Case Me.ComboBox1.Value = "Transfer_Payment_Non_Postables"

Sheet1.Range("I11").Copy

Case Me.ComboBox1.Value = "Transfer_Payment_Related"

Sheet1.Range("I12").Copy

Case Me.ComboBox1.Value = "Transfer_Credit"

Sheet1.Range("I13").Copy

Case Me.ComboBox1.Value = "Remit_Request"

Sheet1.Range("I14").Copy

Case Me.ComboBox1.Value = "Insufficient_Remit"

Sheet1.Range("I15").Copy

Case Me.ComboBox1.Value = "Transposition_Error"

Sheet1.Range("I16").Copy

Case Me.ComboBox1.Value = "Short_Payment"

Sheet1.Range("I17").Copy

Case Me.ComboBox1.Value = "Over_Payment"

Sheet1.Range("I18").Copy

Case Me.ComboBox1.Value = "Assigned_to_Staples"

Sheet1.Range("I19").Copy


End Select

End With

End Sub
 
thanks a bunch guys. got it to work on daves original solution. workbook and form seem to function correctly. thanks again.
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Cross posted User Form error
While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
I would have expected a moderator to know better.
 
Upvote 0
thanks a bunch guys. got it to work on daves original solution. workbook and form seem to function correctly. thanks again.

Glad we both could help but belatedly, I missed the cross post notice - It does make a difference by all who contribute to know if question has been posted elsewhere.

Dave
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,013
Members
448,935
Latest member
ijat

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