ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   USer defined functions (https://www.excelbanter.com/excel-programming/319540-user-defined-functions.html)

Scooter

USer defined functions
 
I need to refer to the cell in which my user defined function has been
entered into. i only know how to use ActiveCell to refer to things.

What other ways are there to reference objects.

Specifcally I am using a formula to print the worksheet name in some cells.

Funtion WS()

WS = ActiveCell.Worksheet.Name

End Function




Norman Jones

USer defined functions
 
Hi Scooter,

Look in VBA help for the Caller property and look at the given example.

---
Regards,
Norman



"scooter" wrote in message
...
I need to refer to the cell in which my user defined function has been
entered into. i only know how to use ActiveCell to refer to things.

What other ways are there to reference objects.

Specifcally I am using a formula to print the worksheet name in some
cells.

Funtion WS()

WS = ActiveCell.Worksheet.Name

End Function







All times are GMT +1. The time now is 12:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com