ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help me! (https://www.excelbanter.com/excel-programming/382123-help-me.html)

hieunguyen82

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


merjet

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


Bob Phillips

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





All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com