Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Executing a macro in another file

I have created a macro and stored in XL Start folder under Msoffice folder of
C: drive. Also I have assigned Ctrl+A as the key for the macro.

My requirement is: I open a new excel file, execute the macro by typing
Ctrl+A keys. Now it should accept few inputs, do the calculations as defined
in the macro and the results should be displayed in the cells of the above
mentioned open excel fie.

Pl Can anybody suggest me solutions for this ?

reply to my posts are welcome
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default Executing a macro in another file

Hi,

I am not very sure how your current macro looks like and what type of
calculations it does. However, I think, if you follow the below approach it
might help

1. Create an Excel Ass-in and store your macro in this add-in.
2. You can use Excel VBA Objects such as ActiveWorkbook, ActiveSheet, Range
etc.
3. You can use Excel VBA Collections such as Sheets, Workbooks etc
4. Eventually, based on nature of calculation, you may want to use looping
constructs such as For...Next, Do while...Loop and conditional statements
such as IF..Else...End IF

HTH,
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"NSNR" wrote:

I have created a macro and stored in XL Start folder under Msoffice folder of
C: drive. Also I have assigned Ctrl+A as the key for the macro.

My requirement is: I open a new excel file, execute the macro by typing
Ctrl+A keys. Now it should accept few inputs, do the calculations as defined
in the macro and the results should be displayed in the cells of the above
mentioned open excel fie.

Pl Can anybody suggest me solutions for this ?

reply to my posts are welcome

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
Executing a bat file from Excel Mr BT[_2_] Excel Worksheet Functions 9 April 16th 07 09:18 PM
executing a macro within another brian Excel Discussion (Misc queries) 3 July 5th 06 01:22 AM
Executing macro in one book from another. michaelberrier Excel Discussion (Misc queries) 3 June 26th 06 10:45 AM
Executing multiple queries through a macro Sharon Excel Discussion (Misc queries) 0 April 1st 05 01:47 AM
Executing a macro from a cell filo666 Excel Discussion (Misc queries) 2 February 15th 05 08:18 PM


All times are GMT +1. The time now is 06:36 PM.

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"