Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combobox Click event triggered when copying worksheet Tom Ogilvy Excel Programming 2 June 30th 05 04:54 PM
combobox/copying sheet joe smith Excel Discussion (Misc queries) 2 March 29th 05 03:55 PM
VBA Help Required - Copying details from ComboBox onto worksheet Alan T[_4_] Excel Programming 1 August 25th 04 06:14 PM
Copying Worksheet triggers Click event of combobox Copying Worksheet triggers click event on combobox Excel Programming 2 January 25th 04 10:51 PM
Copying Worksheet triggers Click event of combobox on another worksheet Robert[_20_] Excel Programming 0 January 23rd 04 07:40 PM


All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"