Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah. That seems like a reasonable thing to try.
If you're working with pictures, you may want to use http://www.irfanview.com. It's a nice picture viewer with lots of features. You can make a pdf file of thumbnail sized pictures. And http://picasa.google.com may be of use if you want a free basic photo editor/organizer. Paul Mathews wrote: Hi Dave, yes you're right, this is a pretty darned strange thing to do. Let's call it an experiment at this point. I guess it's best described as something of an Excel photo viewer (i.e., click a forward or back button and see pictures change on a worksheet as well as text; the text and picture file names are sourced from a data table in another worksheet). I may well end up doing the standard insertion of pictures from files into the worksheet but I was curious about this approach (image controls do have the nice feature of providing automatic sizing of a loaded picture using the PictureSizeMode property). Thanks again for indulging me. "Dave Peterson" wrote: I don't normally put image controls on worksheets. I just plop the pictures where I want them. Is there a reason you don't use the plain old pictures? Just curious. Paul Mathews wrote: Dave, Joel, thank you both very much. Dave, the code you provided is precisely what I was looking for (I couldn't quite figure out how to use the OLEObjects method so that I could specify a string name for each image control and you nailed it with your solution). I appreciate the time you took to provide this solution to me and the rest of the Excel community. Paul Mathews "Dave Peterson" wrote: Option Explicit Sub testme() Dim iCtr As Long For iCtr = 1 To 3 Sheet1.OLEObjects("Image" & iCtr).Object.Picture _ = LoadPicture("c:\pict" & iCtr & ".jpg") Next iCtr End Sub Paul Mathews wrote: I'm attempting to set the picture property of several image controls on a single worksheet (not on a user form). For example, three image controls (named Image1, Image2, and Image3) on Sheet 1: Sheet1.Image1.Picture = LoadPicture("C:\Pic1.jpg") Sheet1.Image2.Picture = LoadPicture("C:\Pic2.jpg") Sheet1.Image3.Picture = LoadPicture("C:\Pic3.jpg") Can anyone suggest a way to set the picture property for each image by looping rather than repeating the loadpicture for each image as above? Thanks in advance. -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Image Controls | Excel Programming | |||
Image and WebBrowser Controls | Excel Programming | |||
Image Edit and WebBrowser controls | Excel Programming | |||
Loop through objects/controls on worksheet | Excel Programming | |||
Bmp vs Gif in Userform image controls | Excel Programming |