LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Launch Click Event Using Application.Run

I want to launch the code that handles a
Click Event procedure defined in one
workbook from another workbook. The
Click Event handler is defined in
workbook "Budget Payee Names.xls" and is
named cbAddPayee_Click.

Private Sub cbAddPayee_Click()
MsgBox "entered cbAddPayee_Click"
End Sub

When I run the following code in the
"other" workbook I get error 1004.

Sub launchAddPayee()
Application.Run "'Budget Payee Names.xls'" & _
"!cbAddPayee_Click"
End Sub

Run-time error '1004':
The macro "Budget Payee Names.xls
'!cbAddPayee_Click' cannot be found.

I think I've ruled out the usual suspects -- syntax error, subroutine name
typo. I've also tried the code with and without the "Private" on the click
event sub. Does the target of application.run need to be in a module, as
opposed to code that resides within the "sheet"?

Any help will be appreciated,

Phil
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
captcure close application event suru Excel Worksheet Functions 2 June 17th 09 07:10 AM
Application level event help John Bundy Excel Discussion (Misc queries) 2 January 15th 08 10:30 PM
Is Multi click Event possible? Ayo Excel Discussion (Misc queries) 6 August 31st 07 10:42 PM
On click button event [email protected] Excel Worksheet Functions 1 November 30th 06 04:39 PM
Can I launch macro by a cell click ? Cedric Dennis Excel Discussion (Misc queries) 2 March 11th 05 04:34 PM


All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"