ANmarS - Search results

Excel/VBA expert since Sep 1997 (20 years 9 months)

We are moving ...

We are moving to another location, better, faster and more resources .... check it out ANmar.Systems

2 Q & A posts tagged with xls

Tue
Apr 13
2010

How do you write a VBA function to work in any Excel spreadsheet you have open?

I wrote a function and saved it in my personal.xls file. When I want to call that function from another spreadsheet, I have to write Personal.xls!FunctionName(). Is there a way to write the code so that I don't have to reference my personal file each time?


Answer

That is because your function name is the same as a build-in function already used in Excel
Try a unique function name, like MYFunc0001

That is the only reason I see, otherwise, the function would be work easily as long as the function file is open

I am using that all the time

let me know

VBAXLMan

Tuesday 4/13/2010 7:47:09 AM
Tue
Mar 31
2009

How do you turn macros on in microsoft excel 2007?


Answer

First, you will need to save your file as Excel macro-enabled worksheet with XLSM as extension rather the default XLSX.

If you are doing ans XLS 2003 file type, ignore that

Then once you open the macro file, Excel will show you a new bar above the Formula bar with "Security warning"
like this screen
http://www.file1.net/img.asp?prj=-8-_-2_…

Click on "Options" and enable the macro content

OR
Show the "Developer" tab, here is a lesson on how to show it
http://www.file1.net/lesson.asp?id=6VM8P…

Then in the Developer tab, click on "Macro Security" in the "Code" section


VBAXLMan

Tuesday 3/31/2009 6:18:07 PM

Tags

History