![]() |
copying combobox
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. |
copying combobox
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. |
copying combobox
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. |
All times are GMT +1. The time now is 07:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com