Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a number of Subs:
Private Sub CommandButton1_Click() Private Sub CommandButton2_Click() Private Sub CommandButton3_Click() etc. They are pretty large. Instead of coping the code into other Sub is there a way to run all three at the same time? ??? Sub NewSub Run Private Sub CommandButton1_Click() Run Private Sub CommandButton2_Click() Run Private Sub CommandButton3_Click() End Sub Does not work, any sugestions? -Randy- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Randy,
Sub NewSub CommandButton1_Click CommandButton2_Click CommandButton3_Click End Sub MP "Randal W. Hozeski" a écrit dans le message de ... I have a number of Subs: Private Sub CommandButton1_Click() Private Sub CommandButton2_Click() Private Sub CommandButton3_Click() etc. They are pretty large. Instead of coping the code into other Sub is there a way to run all three at the same time? ??? Sub NewSub Run Private Sub CommandButton1_Click() Run Private Sub CommandButton2_Click() Run Private Sub CommandButton3_Click() End Sub Does not work, any sugestions? -Randy- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the sheet module, declare them as Public
Public Sub CommandButton1_Click() MsgBox "#1" End Sub Public Sub CommandButton2_Click() MsgBox "#2" End Sub Public Sub CommandButton3_Click() MsgBox "#3" End Sub then in a general module Sub RunAll() Sheet1.CommandButton1_Click Sheet1.CommandButton2_Click Sheet1.CommandButton3_Click End Sub or Sub RunAll() Application.Run "Sheet1.CommandButton1_click" Application.Run "Sheet1.CommandButton2_click" Application.Run "Sheet1.CommandButton3_Click" End Sub Both worked for me. -- Regards, Tom Ogilvy "Randal W. Hozeski" wrote in message ... I have a number of Subs: Private Sub CommandButton1_Click() Private Sub CommandButton2_Click() Private Sub CommandButton3_Click() etc. They are pretty large. Instead of coping the code into other Sub is there a way to run all three at the same time? ??? Sub NewSub Run Private Sub CommandButton1_Click() Run Private Sub CommandButton2_Click() Run Private Sub CommandButton3_Click() End Sub Does not work, any sugestions? -Randy- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do i stop numbers stringing together ? AB | Excel Worksheet Functions | |||
Stringing formulas again | New Users to Excel | |||
Stop text from stringing into next field when empty | Excel Worksheet Functions | |||
Stop text from stringing into next field when empty | Excel Worksheet Functions | |||
Stop text from stringing into next field when empty | Excel Worksheet Functions |