LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default inserting pictures

I need to write some code that will insert 8 pictures on 8 different sheets.
I will also need the ability to go back and delete any pictures that are on
the sheet. I'm having some problems with the code to insert the pictures,
here is what i've got any help will be appreciated

' delete
for i = 1 to 8
Sheets("Sheet" & i).Activate
photo(i).picture.Delete
next

' insert
dim photo(1 to 8) as image
dim picLocation as string
dim iCount as integer

for iCount = 1 to 8
picLocation = "C:\Pic" & iCount & ".jpg"
Sheets("Sheet" & iCount).Activate
Range("D6").Select
set photo(iCount) = activesheet.pictures.insert(picLocation)
photo(a).picture.width = 2
photo(a).picture.height = 3
next


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Pictures cjohnson Excel Discussion (Misc queries) 2 April 2nd 08 07:00 PM
Inserting Pictures DamienO Excel Discussion (Misc queries) 2 October 31st 07 12:40 PM
Inserting Pictures Matthew[_2_] Excel Discussion (Misc queries) 3 July 14th 07 10:23 AM
Inserting Pictures mudraker[_356_] Excel Programming 3 April 10th 06 09:35 AM
inserting pictures Denny[_2_] Excel Programming 5 November 16th 04 01:49 AM


All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"