Evaluating a named constant

  • Thread starter Thread starter Barb Reinhardt
  • Start date Start date
B

Barb Reinhardt

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
 
That's not doing it Bernie. I'm getting

Run-time error 13
Type mismatch

Thanks,
Barb Reinhardt
 
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...
 
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
 
Back
Top