![]() |
|
#2
|
||||
|
||||
|
A constant cannot be the result of a function since that result could change. Similarly you can't declare a constant and then set its value in another routine.
You can either use a variable - which I assume is what you meant with your second option - or use a function that returns the value you want. You can then simply use that function name as you would the constant. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Declare Constant for Chr(14)
|
VBorNotVB | Word VBA | 3 | 12-06-2020 09:28 PM |
| Declaring Public variables and accessing in other modules | rekent | Word VBA | 16 | 11-24-2020 02:09 PM |
Declaring a variable that is known across modules
|
Officer_Bierschnitt | Excel Programming | 5 | 11-18-2015 12:28 PM |
Keep cell in formula constant
|
jprt68 | Excel | 1 | 06-26-2012 08:31 AM |
Keeping the top row constant in Excel
|
MSmand | Excel | 2 | 07-13-2011 01:14 PM |