View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pranav Vaidya Pranav Vaidya is offline
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