Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. -- regards, Tom Ogilvy "Miroslav" wrote in message ... 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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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): 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. -- regards, Tom Ogilvy "Miroslav" wrote in message ... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combobox Click event triggered when copying worksheet | Excel Programming | |||
combobox/copying sheet | Excel Discussion (Misc queries) | |||
VBA Help Required - Copying details from ComboBox onto worksheet | Excel Programming | |||
Copying Worksheet triggers Click event of combobox | Excel Programming | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming |