![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 25
|
Someone changed my question so here is it again:
Hello, Ik have a relative long Macro that needs to be executed when a userform is displayed. First i put the macro code outside the userform, the macro therefore was only executed when the userform was closed. After this i put the exact same code in the userform. But now all i get to see is a white userform and excel crashing on it any one knows how you should do these two tasks simultaniously? my code: Sub mysub1() Consolform.Show ButtonInfra_Click Consolform.ConsolLabel2.Caption = "l" ButtonProducts_Click Consolform.ConsolLabel2.Caption = "ll" ButtonProcesses_Click Consolform.ConsolLabel2.Caption = "lll" ButtonEA_Click Consolform.ConsolLabel2.Caption = "llll" ButtonCIB_Click Consolform.ConsolLabel2.Caption = "llll" ButtonRM_Click Consolform.ConsolLabel2.Caption = "lllll" End Sub This didn't work at all, next i put the code inside the userform this caused excel to crash. Thanks for helping out. -------------------------------------------------------------------------------- |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
Hi. Please look at the link following.
http://www.mrexcel.com/board/viewtop...4618&forum=2&3 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|