Getting workbook and sheet name in UDF

TimFoley

New Member
Joined
Mar 26, 2014
Messages
47
I see that application.caller.address will give me the cell reference that accessed my UDF. However, I cannot find a way to get the workbook and sheet names.

My UDFs reside in a .xlam so ThisWorkbook.name returns the .xlam and ActiveWorkbook.name returns the active workbook which is many times NOT the workbook housing the cell containg the UDF.

I realize I could include both as parameters, but this will make it more painful for the endusers, so I was hoping there was a way to get the workbook and sheet names.

Thanks in advance - Tim
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Watch MrExcel Video

Forum statistics

Threads
1,109,040
Messages
5,526,409
Members
409,701
Latest member
nitmani

This Week's Hot Topics

Top