View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jimx jimx is offline
external usenet poster
 
Posts: 1
Default vba- excel- "for each" what row/col (cell) is it looking at?

Can you please tell me how to get the row and col of the cell that the
'for each cell in userrange' command in vba in excel is Processing.

ex:

a1=5
a2=4

function print("a1:a2")

for each cell in userrange
debug.print cell.Value
' I hope to be able to print a1 = 5 and a2=4
next
end function

will print
5
4

But how can I tell that it is processing a1 or a2 and put THAT valu
in a variable?

What IS cell.Value? is cell a class? and does this class have cell.re
or cell.row or ANYthing?

thank yo

--
Message posted from http://www.ExcelForum.com