Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Static variables

Hello All,

I have a procedure that take a several days to run. In the vent there is
an interruption in the electricity supply I have to start all over.
I have tried setting the variable to "static", which I was hopping wpuld
hold the values of the variables and start from where it left off. This
does not appear to work. Can anyone offer some insight?

Regards
Dk

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Static variables


"Derick Hughes" wrote in message
...
Hello All,

I have a procedure that take a several days to run. In the vent there is
an interruption in the electricity supply I have to start all over.
I have tried setting the variable to "static", which I was hopping wpuld
hold the values of the variables and start from where it left off. This
does not appear to work. Can anyone offer some insight?

Regards
Dk

*** Sent via Developersdex http://www.developersdex.com ***


Off the cuff, I'd create a sheet("placeholder"), break the macro into
numerous sub-routines with each saving the neccessary variables to seperate
lines on the placeholder. When the macro starts, determine the last
subroutine previously processed, load its saved variables then call the
routines from there-on.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Static variables


any computer crashes when you pull the plug.
running variables are GONE unless persisted to harddisk.

I've never tired it.. but I assume that if the computer goes in standby
e.g. on battery low for a laptop.. it should resume when the computer
gets a wakeup.


SO.. you can hook up a UPS to the PC so it has time to suspend itself...
http://www.apcc.com/products/


keeps me wondering how to write code that takes days to execute...
you must be an engineer or scientist :)


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Derick Hughes wrote :

Hello All,

I have a procedure that take a several days to run. In the vent there
is an interruption in the electricity supply I have to start all over.
I have tried setting the variable to "static", which I was hopping
wpuld hold the values of the variables and start from where it left
off. This does not appear to work. Can anyone offer some insight?

Regards
Dk

*** Sent via Developersdex http://www.developersdex.com ***

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
Not at all clear on use of variables and/or object variables JMay-Rke Excel Discussion (Misc queries) 11 July 4th 08 06:36 PM
Initializing static variables in VBA Adrian[_7_] Excel Programming 3 September 3rd 04 01:08 AM
Static Variables Man from Utopia Excel Programming 3 August 8th 04 11:40 PM
Static variables lynnnow[_3_] Excel Programming 3 August 6th 04 07:31 AM
Static variables lynnnow Excel Programming 0 August 6th 04 01:07 AM


All times are GMT +1. The time now is 06:17 AM.

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"