Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Evaluating a named constant

application.evaluate(activeworkbook.Names("Bob").R efersTo)

--
__________________________________
HTH

Bob

"Barb Reinhardt" wrote in message
...
It's a named constant (much like a named range). I've figured out how to
get to it, but still am interested in knowing how to evaluate named
constants.

Thanks,
Barb Reinhardt


"Bernie Deitrick" wrote:

Barb,

How did you define your named constant?

In code or as a name within the workbook:

Option Explicit
Const QADDate As Long = 4

Sub TryNow()
MsgBox QADDate
End Sub


The example that I gave was when creating a name...

--
HTH,
Bernie
MS Excel MVP


"Barb Reinhardt" wrote in
message
...
That's not doing it Bernie. I'm getting

Run-time error 13
Type mismatch

Thanks,
Barb Reinhardt

"Bernie Deitrick" wrote:

Barb,

MsgBox Evaluate("QADDate")

HTH,
Bernie
MS Excel MVP


"Barb Reinhardt" wrote in
message
...
I've done this before, but not in a while and can't find any
examples.

I have a named constant I call QADDate in workbook aWB. How do I
evaluate
the value of this in VBA?

Thanks,
Barb Reinhardt









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation list / named array constant Werner Rohrmoser Excel Worksheet Functions 3 March 19th 08 12:23 PM
Named Constant Shatin[_2_] Excel Programming 5 March 10th 08 07:08 PM
Constant loan payments vs. constant payments of principal lalli945 Excel Worksheet Functions 3 December 20th 06 10:33 PM
if statement evaluating to zero [email protected] Excel Programming 1 July 31st 06 04:14 PM
Evaluating a cell Phillip2001 Excel Programming 2 December 9th 03 03:44 AM


All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"