P
Prof Wonmug
What property do I need to qeury to obtain the name of the workbook,
sheet, and cell where a UDF or macro was called?
sheet, and cell where a UDF or macro was called?
Are these what you are looking for...ActiveWorkBook.Name, ActiveSheet.Name,
ActiveCell.Address?
Here is something out of the VBA help files.
This example displays information about how Visual Basic was called.
Select Case TypeName(Application.Caller)
Case "Range"
v = Application.Caller.Address
Case "String"
v = Application.Caller
Case "Error"
v = "Error"
Case Else
v = "unknown"
End Select
MsgBox "caller = " & v
Look at Application.Caller (.Address)
Remember that the active sheet/book doesn't have to be the one that a UDF
was called from
It all depends on what you're trying to achieve. Maybe you should post that.