ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA: Automatically activating Private Subs (https://www.excelbanter.com/excel-programming/367643-excel-vba-automatically-activating-private-subs.html)

sven_dau[_5_]

Excel VBA: Automatically activating Private Subs
 

Hello,

I have 21 combo boxes in one worksheet each having its own private sub
(Private Sub abc_activate()) for a selection procedure.
If I select each sub in the VBA Editor and then click on the run
sub/userform button the correct result is shown in the respective combo
box.
But it does not do it automatically when I click on the workbook or
open up the file.

How do I automate this clicking orgy?

Rgds,
Sven


--
sven_dau
------------------------------------------------------------------------
sven_dau's Profile: http://www.excelforum.com/member.php...o&userid=35291
View this thread: http://www.excelforum.com/showthread...hreadid=562771


Tom Ogilvy

Excel VBA: Automatically activating Private Subs
 
Use the click event of the combobox.

--
Regards,
Tom Ogilvy


"sven_dau" wrote:


Hello,

I have 21 combo boxes in one worksheet each having its own private sub
(Private Sub abc_activate()) for a selection procedure.
If I select each sub in the VBA Editor and then click on the run
sub/userform button the correct result is shown in the respective combo
box.
But it does not do it automatically when I click on the workbook or
open up the file.

How do I automate this clicking orgy?

Rgds,
Sven


--
sven_dau
------------------------------------------------------------------------
sven_dau's Profile: http://www.excelforum.com/member.php...o&userid=35291
View this thread: http://www.excelforum.com/showthread...hreadid=562771



sven_dau[_7_]

Excel VBA: Automatically activating Private Subs
 

Tom,

If you mean changing from _activate to _click, i.e. from Private Sub
abc_activate() to Private Sub abc_click() in the VBA Editor then it
does not work. The combo box remains empty.

Also, combo box properties does not have an event item.

?

Thanks,
Sven


--
sven_dau
------------------------------------------------------------------------
sven_dau's Profile: http://www.excelforum.com/member.php...o&userid=35291
View this thread: http://www.excelforum.com/showthread...hreadid=562771



All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com