#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help me!


I'm a biginner to study VBA in excel, anybody can explain for me som
command line following:
Do While (tb.Cells(i, 1) < x) And (i < tb.Rows.Count)
I don't understand *tb.Cells(i, 1)* và *tb.Rows.Count *?. Thanks s
much

--
hieunguyen8
-----------------------------------------------------------------------
hieunguyen82's Profile: http://www.officehelp.in/member.php?userid=513
View this thread: http://www.officehelp.in/showthread.php?t=133357

Posted from - http://www.officehelp.i

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default help me!

Most likely "tb" is a variable of type Range, declared and set like
this:
Dim tb As Range
Set tb = Sheets("Sheet1").Range("A1:C6")

Hth,
Merjet

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default help me!

As merjet says, we should be able to safely assume that tb is a range
object, and has been set to some range within the workbook somewhere in the
code.

That code is looping based upon some condition, based on an counter variable
called i, and checks whether the cell i rows down within the range tb is
less than x, and that the counter i is less that the number of rows within
the range tb, that is that you haven't looped beyond that range.

--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"hieunguyen82" wrote in message
...

I'm a biginner to study VBA in excel, anybody can explain for me some
command line following:
Do While (tb.Cells(i, 1) < x) And (i < tb.Rows.Count)
I don't understand *tb.Cells(i, 1)* và *tb.Rows.Count *?. Thanks so
much.


--
hieunguyen82
------------------------------------------------------------------------
hieunguyen82's Profile: http://www.officehelp.in/member.php?userid=5130
View this thread: http://www.officehelp.in/showthread.php?t=1333577

Posted from - http://www.officehelp.in



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



All times are GMT +1. The time now is 10:36 AM.

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"