Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Permanent Variable?

I am sure this is a pretty stupid question, but.....

Is there any way to store a permanent variable that can be incremented
over time between sessions and calls to the function? Meaning: I want
to store a number in a variable that can be accessed / added to / and
subtracted from from different functions over the course of many
workbook openings and closings.

For example: perVar would refer to a number like 1.

When function IncPerm() was run, it would add 1 to perVar so that
perVar = 2 for all other functions to reference from then on.

I know that I can store this value in a cell, but I am trying to avoid
that.


Any one have any ideas on this? All help is greatly appreciated.

Many thanks,

Random

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Permanent Variable?

How would I reference that in VBA? I tried using the macro recorder,
but can't decipher what the verbage is for adding to and subtracting.

I have tried:
ActiveWorkbook.Names("Bob").Value = _
Right(ActiveWorkbook.Names("Bob").Value,
Len(ActiveWorkbook.Names("Bob").Value)-1) + 1

But that errors out....

I can't seem to find this in the help file either... any suggestions?

Random.


On Thu, 14 Aug 2003 20:11:31 -0500, "Chip Pearson"
wrote:

Random,

You might consider storing the value in a defined name.


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
Date is not permanent paintbrush New Users to Excel 2 November 12th 09 03:36 PM
how do you get a permanent cache? Excel Cache Excel Discussion (Misc queries) 18 November 3rd 08 02:38 PM
Making Values Permanent Efrain Excel Discussion (Misc queries) 3 February 13th 07 02:13 PM
Permanent Reference Huber57 Excel Discussion (Misc queries) 1 January 24th 07 03:47 AM
Permanent formula? Orangepegs Excel Worksheet Functions 1 January 12th 07 07:41 PM


All times are GMT +1. The time now is 01:46 AM.

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

About Us

"It's about Microsoft Excel"