View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default for i...next i over images in a sheet

My code didn't alter any other part of what you posted, so it should behave
no differently.

You shouldn't be adding double quotes around the path string.

spath = Activecell.Value

not
spath = """" & ActiveCell.Value & """"

--
Regards,
Tom Ogilvy

"furbiuzzu" wrote in message
ups.com...

Tom Ogilvy ha scritto:

Dim path As String
Dim i As Integer

Sheets("team").Select
For i = 1 To 20
path = Worksheets("team").Range("GW" & i + 1).Value
Activesheet.OleObjects("image" & i).Object.picture = LoadPicture(path)
Next i
End Sub


#2
Activesheet.OleObjects("image" & i).Object.picture = loadpicture("")


--
Regards,
Tom Ogilvy



thanks a lot !!!

i'll try it as soon as possible, now i'm not at home.

but i've encountered another problem in the command

Loadpicture(path)

the variable path as you can see is related with a cell where i merge
the "s before and after the "real" path.... do you think i'll encounter
the same problem with your code lines?