Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Displaying a picture

I have a cell that contains a file path to a bitmap. I
would like to display this bitmap on initialization of the
userform that I have my picture object on. This bitmap
will change constantly so I can't just do it in the
properties. Is there a way of doing this?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Displaying a picture

Assume the cell contains a fully qualified filename:

Private Sub Userform_Initialize()
Dim sStr as String
sStr = Worksheets("Sheet1").Range("B9").Value
if dir(sStr) < "" then
Image1.Picture = LoadPicture( sStr)
End if
End Sub

Note that the event name is Userform_Initialize, regardless of the name of
the userform.

--
Regards,
Tom Ogilvy


"Todd" wrote in message
...
I have a cell that contains a file path to a bitmap. I
would like to display this bitmap on initialization of the
userform that I have my picture object on. This bitmap
will change constantly so I can't just do it in the
properties. Is there a way of doing this?

Thanks



Reply
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
Displaying a Picture with a Macro JB Bates[_2_] Excel Discussion (Misc queries) 1 November 2nd 09 10:48 PM
Retreiving and displaying picture based on criteria from validatio Rob R. Excel Discussion (Misc queries) 0 June 3rd 09 10:28 PM
displaying an excel-linked jpg in picture and fax viewer ZR1991 Excel Discussion (Misc queries) 0 September 21st 07 10:46 PM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
displaying picture in a userform Todd Huttenstine[_3_] Excel Programming 1 January 28th 04 02:42 AM


All times are GMT +1. The time now is 04:47 AM.

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

About Us

"It's about Microsoft Excel"