ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Defined names in Macros (https://www.excelbanter.com/excel-programming/373340-defined-names-macros.html)

[email protected]

Defined names in Macros
 
This is frustrating me to no end... I feel like it must be something
simple and I am missing it.

I have names defined in my worksheet which are defined as calculations.


I want to use those name (calculations) in my Macro's to display a
message box.

For example Changes is defined as =counta($A:$A) and I want to display
a message box which say "The number of Changes is: (number of changes)"

Help please!


Bob Phillips

Defined names in Macros
 
MsgBox "Number of changes is: " &
ActiveSheet.Evaluate(ActiveWorkbook.Names("changes ").RefersTo)


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
This is frustrating me to no end... I feel like it must be something
simple and I am missing it.

I have names defined in my worksheet which are defined as calculations.


I want to use those name (calculations) in my Macro's to display a
message box.

For example Changes is defined as =counta($A:$A) and I want to display
a message box which say "The number of Changes is: (number of changes)"

Help please!





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

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