View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default how to addshapes in a position decided by offsetting a cell ,

Did you try this?

Didn't it put each rectangle over different cells?

EXCEL NEWS wrote:

Thanks a lot.For your sub,

the sub is all ok,but i just want to addshape to the cell,

so i have to calculate the point-style position,

thanks
best regards

"Tom Ogilvy" wrote in message
...
for i = 1 to 10 step 3
for j = 1 to 4 step 2
with range("B9").Offset(i,j)
Activesheet.Shapes.AddShape msoShapeRectangle, _
.Left, .Top, .Width, .Height
End With
Next j
Next i

--
Regards,
Tom Ogilvy


"EXCEL NEWS" wrote in message
...
hi,

i wonder how to addshapes in a position decided by offsetting a cell ,

instead of points ,like this ActiveSheet.Shapes.AddShape
msoShapeRectangle,
179.25, 194.25, 14.25, 9

thanks,





--

Dave Peterson