Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default Question about a Variable being Nothing

This is my Code:
Public Var1, MyRange as Range


Sub A

For c = 1to 10 do
Call Sub B
Next c

end Sub A

Sub B

Set Var1 = MyRange.Find("Blah", lookat:=xlPart, _
Searchorder:=xlByRows)

if Not (Var1 is Nothing) then
Debug.print "Var1 exist"
end if

end Sub B

Sub B gets looped 10 times. I run into this problem where if Var1 is found
in one iteration, in the next iteration, even though it doesn't refer to any
Range, it is not recognized as Nothing anymore. Why is that?
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
Variable name question JTWarthogs Excel Discussion (Misc queries) 3 May 7th 09 02:22 PM
Question about a Variable being Nothing Pranav Vaidya Excel Programming 1 August 17th 07 02:06 AM
Variable Question alvin Kuiper Excel Programming 4 February 12th 06 01:14 PM
variable question Gary Keramidas Excel Programming 8 November 16th 05 04:28 PM
variable question Gary Keramidas[_2_] Excel Programming 5 September 2nd 05 08:30 AM


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