Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Excel 2000 - One place for code

  Asked By: Aditi    Date: Mar 05    Category: MS Office    Views: 848
  

I'm stuck with trying to use one place for code general across a
number of workbooks. I've tried saving as an XLA file but haven't got
it to work.

Can someone help in executing a procedure from a different workbook
please?

Workbook 1
..Has a procedure
Workbook 2
..Has a button.

I'd like the button, when pressed, to run the code in workbook 1.

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Adalwen Fischer     Answered On: Mar 05

Have you checked to see that xla workbook has been selected as an add-in (in
tools menu)?

 
Answer #2    Answered By: Dylan Evans     Answered On: Mar 05

Yes in the Sheets... and tried to in the VBE but I don't see it there.

 
Answer #3    Answered By: Kerry Wright     Answered On: Mar 05

I don't think I have explained myself properly.

You have to save workbook 1 as an xla file. Then from within Excel itself (not
VBA) go to Tools, Add-Ins, Browse for the file workbook 1, select it and it
should then show up with a tick beside it in your list of Add-Ins. The macro
code within it will then be available for use in workbook 2.

Hope this is clearer?

 
Answer #4    Answered By: Miriam Green     Answered On: Mar 05

I think I've got it now. I was probably too vague in my description. I
wanted to use code  in workbook 1 from *code* in workbook 2.

I found a great web page that gave me the solution.... I wasn't adding
the XLA to the References in the VBE.

http://www.fontstuff.com/vba/vbatut08.htm

Thanks for your help... you prompted me to put "reference" in the
google search!

 
Answer #5    Answered By: Alberta Miller     Answered On: Mar 05

Not something I've ever tried - so I wouldn't have been able to help - but if I
do ever try at least I'll have the answer!

 
Didn't find what you were looking for? Find more on Excel 2000 - One place for code Or get search suggestion and latest updates.




Tagged: