copying combobox

G

Guest

Hi, this is part of my macro:

Private Sub ComboBox1_Change()
ComboBox1.BottomRightCell(3, 1) = ComboBox1.Column(1)
ComboBox1.BottomRightCell(4, 1) = ComboBox1.Column(3) * (0.001)
ComboBox1.BottomRightCell(5, 1) = ComboBox1.Column(6)
........ etc. .........
End Sub

I need more ComboBoxes with the same function. If I copy this ComboBox1, the
name of new ComboBox changed and did not work. Every ComboBox must have own
name? Please help.
 
T

Tom Ogilvy

This is a technique for linking multiple commandbuttons to a single event.
You can use the same technique with your variable number of comboboxes. If
you implement this technique, using a generalized event that receives a
reference to the combobox (as is done for the commandbuttons), then you can
achieve your objective.

http://www.j-walk.com/ss/excel/tips/tip44.htm
John Walkenbach's site.
 
G

Guest

Tom,

thanks for advise. I tried this technique but unsuccessfully. This is my
problem: I have several comboboxes in worksheet (not in UserForm) with one
event. I understand the "Multiple UserForm buttons with one subroutine" but I
do not know generalized the combobox event in ClassModule for my case. Please
help.

regards,
Miroslav

„Tom Ogilvy" napísal (napísala):
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top