LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Resetting a variable to nothing

Hi
If it is an object variable use

Set object = Nothing

This is done to release memory. For other variables (Boolean, Double
etc) you should not need to set their value to nothing. A variable
defined inside a sub for example only exists for the lifetime of that
sub. During the sub, the variable is initialised to have some value
(otherwise you wouldn't define it in the first place) and ceases to
exist in memory at the end of the sub. There should not be a reason to
say the variable has no value - I don't know a lot about the memory
implications of variable declarations in VB mind, so don't take this
as Gospel!

regards
Paul


"Todd Huttenstine" wrote in message ...
How do I set a variable to nothing?



 
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
Resetting the scroll bar Todd Excel Discussion (Misc queries) 1 November 13th 09 08:53 PM
Resetting Defaults jnix Setting up and Configuration of Excel 1 August 12th 09 10:29 PM
Why are my options resetting themselves? cbare Excel Discussion (Misc queries) 0 November 2nd 06 11:30 PM
resetting last cell jagdish.eashwar Excel Discussion (Misc queries) 11 March 31st 06 02:06 AM
Resetting variables TBA[_2_] Excel Programming 3 December 18th 03 03:44 AM


All times are GMT +1. The time now is 12:34 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"