Fixing Excel 2003 VBA that appears broken in Excel 2007

J

Jeroen Boot

I maintain a spreadsheet created by someone else that calls user defined functions.

Recenty I needed to migrate to Office 2007. All worked fine in xl2003, but xl2007 returns #NAME?.

Even this simple test fails:

Public Function testFunc(MyValue As Variant) As Variant
testFunc = "You gave me " & MyValue
End Function

Can someone give me a hint where to start ?

EggHeadCafe - Software Developer Portal of Choice
The XML I-Ching: Tao of the DOM
http://www.eggheadcafe.com/tutorial...054-6e21dad2bb96/the-xml-iching-tao-of-t.aspx
 
D

Dave Peterson

Did you put the code in a General module (not in a worksheet module, not in the
ThisWorkbook module)?

Did you remember to allow macros to run?
 
B

Barb Reinhardt

It works for me here when I do this

Sub test()
Debug.Print testFunc("value")

End Sub


What are you passing to it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top