Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default Execute code from book1 of code from book2

Is there a way of executing code that is in book2 from book1 via VB Code?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Execute code from book1 of code from book2

application.Run "Book2.xls!MyMacro"

--
Regards,
Tom Ogilvy


"Rick" wrote:

Is there a way of executing code that is in book2 from book1 via VB Code?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Execute code from book1 of code from book2

Application.Run "Book2.xls!module1.MyMacro"

"Rick" wrote:

Is there a way of executing code that is in book2 from book1 via VB Code?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Execute code from book1 of code from book2

You can use Application.Run.

Application.Run "Book2.xls!ProcedureName"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)

"Rick" wrote in message
...
Is there a way of executing code that is in book2 from book1 via VB Code?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default Execute code from book1 of code from book2

Thanks for the help

"vbapro" wrote:

Application.Run "Book2.xls!module1.MyMacro"

"Rick" wrote:

Is there a way of executing code that is in book2 from book1 via VB Code?

Reply
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
VBA - Testing for Book1, Book2 etc. dhstein Excel Discussion (Misc queries) 1 May 22nd 09 10:12 AM
Book1 and Book2 JohnR Excel Discussion (Misc queries) 2 July 6th 07 02:10 AM
=SUMIF(book2!L3:AF3, "=book1!O30", book2!L20:AF20) dond Excel Discussion (Misc queries) 1 November 8th 05 12:33 PM
run macro in book1 from book2 - how? billy Excel Programming 1 December 18th 03 05:59 PM
IE to Book1, to book2, then close Book1.xls GotDebt Excel Programming 3 December 5th 03 08:31 PM


All times are GMT +1. The time now is 06:37 AM.

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"