View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
[email protected] manohar.shankar@gmail.com is offline
external usenet poster
 
Posts: 6
Default unique id for excel cell/range objects

Thanks again Rowan and Patrick

I hastily replied last time without experimenting enough. I
misunderstood what Patrick was saying and was trying to set and and
print name. The set name ofcourse worked but when you print the name it
always prints the system generated name, not the one I set. Here is the
working code.
intRowCount = activesheet.UsedRange.Rows.Count
For i = 1 To intRowCount
Set row = activesheet.Rows(i)
row.Name = "row_id_1234532"
For Each cell In row.Cells
If IsNull(cell) = False And Not cell = "" Then
cell.Name = "cell_id_23223323"
End If
Next
Next i

thanks for all the help

I have one more question brewing, will post soon!!