Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calling a subroutine with a command button
Hello,
I want to run a subroutine, when a command button is clicked. The subroutine is stored in Sheet1 under the Microsoft Excel Objects folder of my project and the command button is stored under UserForm1 in the Forms folder of my project. Is there a certain command needed to reference the other folder? This is the code I have right now (Guessing_game is the name of the subroutine I want to cal). Private Sub CommandButton1_Click() Sheet1.Activate Call Guessing_game End Sub When I run this, I get an error stating "Sub or Function not defined." Does anyone know how I can do this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calling a VBA add in from a macro subroutine | Excel Programming | |||
Calling command button from another sheet | Excel Programming | |||
HELP! Calling subroutine in different workbook | Excel Programming | |||
Calling a subroutine in a loop | Excel Programming | |||
Calling the Solver via a subroutine | Excel Programming |