Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to declare "c" For Each c In Range()

Status
Not open for further replies.

sjh

Programmer
Oct 29, 2001
263
US
Hi,
How should I declare "c" in the following code?

For Each c In wSystemData.Range("Scenario")
'do stuff
Next c

Thanks!
 
As Range. When you work with any combination of cells (also row, column or single cell) - this is always Range.

combo
 
You have use a rather "lazy" line of code, which in full would be :-

For Each c In wSystemData.Range("Scenario").Cells ....

so you can use things like :
x = c.Value



Regards
BrianB
** Let us know if you get something that works !
================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top