Call a function in some sheets

H

henpat

Hello all

I'm creating a code in sheet1, it works fine, but now I need to use the same
code in sheet2 without write again the code.
Also I need to change the name Sheet1 for another name.
In other words, I need a code that can runs in any sheet.

Thanks for your time and sugestions.
henpat
(Excel 2003 SP2)
 
B

Bob Phillips

Is it a function in that workbook used in a worksheet? If so, precede with
the book name

='my book.xls'!myFunc()

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
V

VancitysFinest

Put the code in a Module, not in a sheet. Then you can run it from any
sheet.
 
Top