Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I did not get an answer that worked for me in an earlier post, am trying
again - if someone can figure out what is wrong I would really appreciate it: I have a subprocedure shown below, in a module which is named CharStats, in Personal.xls: Public Sub FindChar() frmFindCharacters.Show End Sub I want the click event of command button on a sheet in another open workbook to call it, and wrote: Private Sub CommandButton1_Click() Application.Run "Personal.xls!FindChar" End Sub I am getting an error message saying : "The macro 'Personal.xls!FindChar' cannot be found. Pls help, thanks. "K Dales" wrote in message ... A sub to be Public to be used by any other module: Public Sub OtherMacro() "William Benson" wrote: I have a command button on Sheet1 the click event says application.run "personal.xls!OtherMacro" The called macro is in a code module named "MyModule" in personal.xls. It is declared as Sub OtherMacro() I am getting an application error every time the click event fires, any ideas? TIA ... Bill |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"William Benson" wrote in message
... I did not get an answer that worked for me in an earlier post, am trying again - if someone can figure out what is wrong I would really appreciate it: I have a subprocedure shown below, in a module which is named CharStats, in Personal.xls: Public Sub FindChar() frmFindCharacters.Show End Sub I want the click event of command button on a sheet in another open workbook to call it, and wrote: Private Sub CommandButton1_Click() Application.Run "Personal.xls!FindChar" End Sub I am getting an error message saying : "The macro 'Personal.xls!FindChar' cannot be found. How bout FindChar and shange the sub to just plain sub not private sub I'm not much of a techo but thats how I call other subroutines |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I copied your code from your posting and renamed the module in personal.xls
to CharStats. Created a Userform in Personal.xls named frmFindCharacters. Added a commandbutton1 in another workbook and pasted your event code there. It worked fine for me. -- Regards, Tom Ogilvy "William Benson" wrote in message ... I did not get an answer that worked for me in an earlier post, am trying again - if someone can figure out what is wrong I would really appreciate it: I have a subprocedure shown below, in a module which is named CharStats, in Personal.xls: Public Sub FindChar() frmFindCharacters.Show End Sub I want the click event of command button on a sheet in another open workbook to call it, and wrote: Private Sub CommandButton1_Click() Application.Run "Personal.xls!FindChar" End Sub I am getting an error message saying : "The macro 'Personal.xls!FindChar' cannot be found. Pls help, thanks. "K Dales" wrote in message ... A sub to be Public to be used by any other module: Public Sub OtherMacro() "William Benson" wrote: I have a command button on Sheet1 the click event says application.run "personal.xls!OtherMacro" The called macro is in a code module named "MyModule" in personal.xls. It is declared as Sub OtherMacro() I am getting an application error every time the click event fires, any ideas? TIA ... Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro calling another macro + variables | Excel Discussion (Misc queries) | |||
Calling a macro from a key | Excel Programming | |||
macro calling macro | Excel Programming | |||
how to disable a macro by calling it from another macro | Excel Programming | |||
Calling macro in add-in. | Excel Programming |