#NAME is the error message. Shoulda stated that, sorry. Hmmm...I went in and checked and it says Sheet12. When I created it I went to my spreadsheet and double clicked the "Visual Basic" icon. Then I pasted the code in.
I think your function is in the wrong place. In the VB editor, go to Insert - Module, and put your function there. Refresh the formula in the workbook, and you should have success.
OK Luke, I did that. I'm getting the same error. I don't know diddly about writing VBA code this is my first attempt. Do I have to save the code first? If so, how do I do that?
Yeah, the code is still "=GetUserName()" after I save it. One thing tho...I notice that the type ahead feature brings up lots of suggestions for putting my code in F14 like "getpivotdata" but "GetUserName" does not pop up in the type ahead suggestions.
Bah...This shouldn't actually make a different, but what if you change the function name to something simple, like "test" and then change the formula in your workbook?
Also, if it's possible to bring up the "formula wizard" (in 2003, I can click on the Fx button to left of formula bar), you're function should be in the User Defined category.
Same result. I did find 3 functions in the User Defined category. They are all the same cuz I've been working to get it right. Should I delete 2 of them? If so how do I delete them?
Yea, you should delete the others so that's there's only 1 function with the unique name. Simply select the text/code in the VBE and hit the delete key.