View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default object array in excel

Name the pictures the same as the team name. The code below will put each
picture in column b along side the Team Name

Range("A1") = "Footy team Gfx"
Range("A2") = "Footy team Gfy"
Range("A3") = "Footy team Gfz"

For RowCount = 1 To 3
TeamName = Range("A" & RowCount)
Set MyPict = ActiveSheet.Pictures(TeamName)
MyPict.Top = Range("B" & RowCount).Top
MyPict.Left = Range("B" & RowCount).Left
Next RowCount


"OzziePete" wrote:

I have created a form with 16 different images (Footy team Gfx)
How do I address these graphics on both other forms and worksheets
using for next loops, I have named the images Logo_01, Logo_02....etc
I am currently working around this with huge chunks of Select Case Code