![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
Hi,
I want to permanently store a value that can be referenced next time the sheet is opened, but I'd prefer not to use the sheets to store the value as these can then be edited by the user. What I want to do is store the value as a permanent constant. Something similar to the word VBA stuff: activedocument.Variables.Add "sample", 19 Any ideas anyone, Any help much appreciated. Cheers, epymsam |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Hi,
Insert>Name>Define Name your variable and assign it the value you want. This isn't foolproof, but should be OK. You also may want to assign a constant in a VBA module and password protect the VBA so the variable can't be changed. I don't know off hand what would happen if someone tries to reassign the value of the variable by naming it, for instance. HTH, Jay |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|