UDF "FileName" and Cell("filename")

BuddieB

Board Regular
Joined
Aug 6, 2003
Messages
174
I created a UDF that returns the filename of the active file:

however, when I named the file I forgot that the CELL function has an option for "filename". Is there a way to remove an older UDF such that my CELL function will work. I have already tried renaming the UDF to FName, but now XL doesn't recognize FName as a function, and it still recognizes FileName as a function.

I have these UDF's stored in my personal.xls file if that matters and I am running XL2000 on Win2000

I can't seem to figure out why it wont reconize the new UDF name? :oops:

EDIT: Here is my new function code if that matters:

Code:
Public Function FName() As String
    'i.e. [file.xls]
    Application.Volatile
    FName = ActiveWorkbook.Name
End Function
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
66,494
Office Version
  1. 365
Platform
  1. Windows
If you don't need the UDF anymore, why not just remove it from your personal.xls file altogether?
 

BuddieB

Board Regular
Joined
Aug 6, 2003
Messages
174
I just realized where it came from...

I loaded the MOREFUNC.XLA recently and it has a UDF in it with the name FILENAME, which precludes the use of the CELL("Filename") embeded worksheet function.

When I unloaded the Add-in, it took care of my problem.

Just a thought, but whomever wrote the MOREFUNC, might want to think of renaming that UDF, to prevent this conflict. Just a thought.
 

Forum statistics

Threads
1,186,165
Messages
5,956,323
Members
438,247
Latest member
UZev

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top