Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Set Integer Variables back to Zero

You can reset non-object variables to their default values using Empty:

Dim i As Long
Dim s As String

i = 10
s = "ttt"

i = Empty
s = Empty
Debug.Print i, Len(s)

Object require Nothing ;
Dim o as object
Set o=Nothing

NickHK

"Kou Vang" wrote in message
...
I am running several loops and was wondering how do I reset the Integer
variables back to 0? I tried putting the Dim Statements inside the loop

but
that didn't work. This must be so easy, but it's like math, I don't

remember
remedial stuff only what's most recent. Same goes in

programming...Sigh...

Kou



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
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
copy back macro/roll back moh Excel Worksheet Functions 4 March 5th 07 02:19 PM
Concatenate two variables (String & Integer) Sreenivas Varadhan Excel Programming 3 December 12th 05 01:28 PM
Declaring variables (Long, String, Integer) and interpretation spe MrT Excel Programming 4 December 12th 04 12:43 PM
4 variables to one sheet, then back to original sheet with answer Howard Excel Programming 1 January 3rd 04 09:17 PM


All times are GMT +1. The time now is 08:25 PM.

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"