View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default what happens when this code is run?

It is not that homework is not allowed, it just does not help you to learn
very much if someone just gives you the answer. BTW the answer to this one
is that intCounter will equal the number of iterations that the loop makes
before reaching a cell in column A that contains the string "Hello". Were
you expecting a number?

"xtalenaj" wrote:

is homework not allowed?

"Don Guillett" wrote:

Homework?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"xtalenaj" wrote in message
...
Suppose that an Excel spreadsheet contains the value "Hello" in cell A10
but
is otherwise empty when the following code fragment is executed:

Code:
Dim intCounter As Integer
  
   intCounter = 1
  
   Do While Cells(intCounter, 1).Value < "Hello"
   intCounter = intCounter + 1
   Loop
  
After this code fragment is run, the value of intCounter will be what?