Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default How to run a macro in code

After I created a macro, how do I run this macro in code ?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default How to run a macro in code

sub created_makro()

'bla bla

end sub


sub other_macro()

call created_makro

end sub


is that what u looking for?

After I created a macro, how do I run this macro in code ?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to run a macro in code


Good morning Man Utd (???)

...or if you're feeling really lazy you can miss out the "Call".

Sub other_macro()
created_makro
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=379257

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default How to run a macro in code


exactly the OP's point

other_macro will give compile error
if created_macro does not exist.

use
application.run thisworkbook.name & "!created_macro"

make sure created_macro is not private.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Snake Plissken wrote :

sub created_makro()

'bla bla

end sub


sub other_macro()

call created_makro

end sub


is that what u looking for?

After I created a macro, how do I run this macro in code ?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to run a macro in code

Sorry for my lack of macro knowledge, I think macro is a sort of
function/procedure.
What I need to do is:
When I fill in the cell in worksheet A, eg. B3 has value "Peter", I will
call a macro/function/procedure to search through a range of cells in
worksheet B, eg. A2:D200, if I find the matched value in column A is also
"Peter", eg A10, then I need to fetch the values of B10, C10, D10, fill in
the worksheet A cells C3, D3, E3 from the corresponding row in the worksheet
B of the matched value.

"keepITcool" wrote in message
ft.com...

exactly the OP's point

other_macro will give compile error
if created_macro does not exist.

use
application.run thisworkbook.name & "!created_macro"

make sure created_macro is not private.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Snake Plissken wrote :

sub created_makro()

'bla bla

end sub


sub other_macro()

call created_makro

end sub


is that what u looking for?

After I created a macro, how do I run this macro in code ?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default How to run a macro in code


i think you are a recent visitor to this newsgroup/forum
and I also think you are just discovering excel
IMO for the moment you should stick to formulas and functions...

this NG is concerned with VBA/programming/macros.

try a different group:
try microsoft.public.excel.worksheetfunctions

VanTheMan!!!

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Man Utd wrote :

Sorry for my lack of macro knowledge, I think macro is a sort of
function/procedure.
What I need to do is:
When I fill in the cell in worksheet A, eg. B3 has value "Peter", I
will call a macro/function/procedure to search through a range of
cells in worksheet B, eg. A2:D200, if I find the matched value in
column A is also "Peter", eg A10, then I need to fetch the values of
B10, C10, D10, fill in the worksheet A cells C3, D3, E3 from the
corresponding row in the worksheet B of the matched value.

"keepITcool" wrote in message
ft.com...

exactly the OP's point

other_macro will give compile error
if created_macro does not exist.

use
application.run thisworkbook.name & "!created_macro"

make sure created_macro is not private.


--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



Snake Plissken wrote :

sub created_makro()

'bla bla

end sub


sub other_macro()

call created_makro

end sub


is that what u looking for?

After I created a macro, how do I run this macro in 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
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
Macro to change Macro code? Kaisies Excel Programming 2 March 23rd 05 03:34 AM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM
Macro or VB Code Syd[_4_] Excel Programming 1 January 6th 04 02:16 PM


All times are GMT +1. The time now is 11:25 AM.

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

About Us

"It's about Microsoft Excel"