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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
If you don't need the UDF anymore, why not just remove it from your personal.xls file altogether?
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,257
Members
448,880
Latest member
aveternik

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
Back
Top