Problem with ComboBox and Command Button macro...

Bubbis Thedog

Well-known Member
Joined
Jul 29, 2004
Messages
967
Newbie, folks! What's up?

The code below is contained within my Sheet1 object:

Code:
Public Sub Finish_Click()
     
    Application.ScreenUpdating = False
     
    Sheets("Invoice").Range("B1:B2").Copy
     
    Sheets("Database").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial _
    Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
     
    Sheets("Invoice").Range("C8:F8").Copy
     
    Sheets("Database").Range("A65536").End(xlUp).Offset(0, 2).PasteSpecial _
    Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
     
    Application.ScreenUpdating = True
     
End Sub
Private Sub Worksheet_Activate()
     
    Application.ScreenUpdating = False
     
    Dim cbCVals
    Dim i As Integer
     
    cbCVals = Array("Axle", "Wheel")
     
    cbComponents.Clear
    cbComponents2.Clear  'More than one component can be ordered, but _
                                     'I'll work on that code later
      For i = 0 To 1
        cbComponents.AddItem cbCVals(i)
        cbComponents2.AddItem cbCVals(i)
      Next i
    
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
     
End Sub

So I select an item from the ComboBox... Then I click the Finish Command Button to send data from Sheet1 into Sheet2. I can't get things to work so that the ComboBox retains only the data listed in the Array. Basically, it resets everytime I click the Finish button, and that screws up formulas that depend on the value chosen from the list.

What am I doing wrong? Is copying and pasting not the way to go about what I'm trying to accomplish?

Any help whatsoever would be greatly appreciated!!!

Thanks,

Bubbis Thedog

P.S. Are attachments not allowable on here? Just curious.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,203,468
Messages
6,055,597
Members
444,800
Latest member
KarenTheManager

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