Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default A variable that save its value

Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default A variable that save its value

I think the easiest thing would be to put the value in a worksheet (and hide
that worksheet).

But you could use a Name, too.

Chip Pearson has some notes by Laurent Longre at:
http://www.cpearson.com/excel/hidden.htm

that uses a hidden name space.

filo666 wrote:

Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default A variable that save its value

You may be able to just use a text file, too.

Kind of like an .INI file.

(I like the hidden worksheet--it seems easiest.)

filo666 wrote:

Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default A variable that save its value

Some possibilities-

If you only need the variable/value in a particular workbook -
A Defined name's refersto
some cell

Or for anything -
as above but in -
Personal.xls (save before you're asked to)
An addin (you won't get asked so save it)
some other workbook (perhaps in XLStart)

ini or text file
registry

Regards,
Peter T

"filo666" wrote in message
...
Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default A variable that save its value

Thnak you (both of you), I thought about put the value in a cell but is more
interesting how to save it into another file (.ini), could some of you tell
me an example how to save the value in a file???

sub SaveTheValueOfAVariable()
dim a as string
a=cell(1,b)
'Here I want to save a so the next time excel is open a has his value
end sub
Tanks you very much
"Peter T" wrote:

Some possibilities-

If you only need the variable/value in a particular workbook -
A Defined name's refersto
some cell

Or for anything -
as above but in -
Personal.xls (save before you're asked to)
An addin (you won't get asked so save it)
some other workbook (perhaps in XLStart)

ini or text file
registry

Regards,
Peter T

"filo666" wrote in message
...
Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default A variable that save its value

In help see -

Print # Statement & Open # Statement

In the examples change "Testfile" to the full path & name.

Ini files are a bit more complicated and require API's, plenty of examples
in this ng.

Regards,
Peter T

"filo666" wrote in message
...
Thnak you (both of you), I thought about put the value in a cell but is

more
interesting how to save it into another file (.ini), could some of you

tell
me an example how to save the value in a file???

sub SaveTheValueOfAVariable()
dim a as string
a=cell(1,b)
'Here I want to save a so the next time excel is open a has his value
end sub
Tanks you very much
"Peter T" wrote:

Some possibilities-

If you only need the variable/value in a particular workbook -
A Defined name's refersto
some cell

Or for anything -
as above but in -
Personal.xls (save before you're asked to)
An addin (you won't get asked so save it)
some other workbook (perhaps in XLStart)

ini or text file
registry

Regards,
Peter T

"filo666" wrote in message
...
Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default A variable that save its value

A little search of google will give you lots of hits:

http://groups.google.co.uk/group/mic...63099721c94c8e

or

http://snipurl.com/f0iz



filo666 wrote:

Thnak you (both of you), I thought about put the value in a cell but is more
interesting how to save it into another file (.ini), could some of you tell
me an example how to save the value in a file???

sub SaveTheValueOfAVariable()
dim a as string
a=cell(1,b)
'Here I want to save a so the next time excel is open a has his value
end sub
Tanks you very much
"Peter T" wrote:

Some possibilities-

If you only need the variable/value in a particular workbook -
A Defined name's refersto
some cell

Or for anything -
as above but in -
Personal.xls (save before you're asked to)
An addin (you won't get asked so save it)
some other workbook (perhaps in XLStart)

ini or text file
registry

Regards,
Peter T

"filo666" wrote in message
...
Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS





--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default A variable that save its value

I use registry settings:
'======
Sub GetRegistrySetting()
'Begin Registry setting
'"appname:=" = Desired name you create, variable or "string", preferred
a "string"
'"section:=" = Desired name you create, variable or "string"
'"Key:=" = Desired name you create, variable or "string"
'Notes: Variables do not use quotes, strings use quotes
SomeVariable = GetSetting(appname:="AppNameHere",
section:="SectionNameHere", _
Key:="KeyNameHere")
'End registry setting
End Sub

Sub SetRegistrySetting()
'Begin Registry setting
'"appname:=" = Desired name you create, variable or string, preferred a
string
'"section:=" = Desired name you create, variable or string
'"Key:=" = Desired name you create, variable or string
'setting:=" = variable or string
SaveSetting appname:="AppNameHere", section:="SectionNameHere", _
Key:="KeyNameHere", setting:="SettingValueHere"
'End registry setting
End Sub
'======
--
Regards

VBA.Noob.Confused
XP Pro
Office 2007



"filo666" wrote:

Hi, There is somehow a variable rememver his value allthought excel is
closed???
TKS

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
Save Cellformat in a variable jj Excel Discussion (Misc queries) 0 January 17th 06 05:59 PM
How to Save As Variable File Name [email protected] Excel Programming 10 May 25th 05 12:27 PM
Save to Path & Variable file name Otto Moehrbach[_6_] Excel Programming 4 September 2nd 04 10:44 PM
auto save with variable name with html extension Jason[_29_] Excel Programming 0 May 25th 04 03:40 AM
Using a variable string in a file save path Ron[_13_] Excel Programming 1 October 16th 03 08:29 PM


All times are GMT +1. The time now is 09:49 PM.

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"