View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
R Kalal R Kalal is offline
external usenet poster
 
Posts: 4
Default Iterating through Cells .Net/Excel 2003

Hi Wei-Dong Xu,

Thanks for the help. You suggestion worked perfectly.

Rick
"Wei-Dong Xu [MSFT]" wrote in message
...
Hi Rick,

Thanks for posting in the community!

From my understanding to this issue, you met the "Member not found" error
when you want to set the cell property in one range with VB.net.

You can convert the Range.Cells type to "Object" so that the variable "c"
in "For each" statement will retrieve the member from Cells very
successfully. I list the codes for you:
'Code begin ----------------------------------------------------
..
Dim c as object
For Each c In CType(objRange.Cells, Object)
c.Value = 1000
Next c
..
'Code end ------------------------------------------------------

Please feel free to let me know if you have any further questions. I am
standing by to be of assistance.

Enjoy a nice day!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.