PC Review


Reply
Thread Tools Rate Thread

Adding an image to an Image control

 
 
ordnance1
Guest
Posts: n/a
 
      24th Nov 2009
I would like to create a worksheet where I can store information on number
of items. Each row of the worksheet would store data on 1 item only, and the
last cell of data would contain a link to an image of the item
(C:\Users\Dad\Desktop\test.png).

What I can not figure out is how to create the code to display the image in
an Image control on my Userform.

What I tried was:

Image1.Picture = Range("E3").Value

where Range("E3") contained C:\Users\Dad\Desktop\test.png.

Is this do able? If so could someone point me in the right direction.

 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      24th Nov 2009
Image1.Picture = LoadPicture(Range("E3").Value)

Depending on the way you have things arranged you might need to do something
like

Worksheets("Sheet1").OLEObjects("Image1").Object.Picture =
LoadPicture(Range("E3").Value

Regards,
Peter T



"ordnance1" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I would like to create a worksheet where I can store information on number
>of items. Each row of the worksheet would store data on 1 item only, and
>the last cell of data would contain a link to an image of the item
>(C:\Users\Dad\Desktop\test.png).
>
> What I can not figure out is how to create the code to display the image
> in an Image control on my Userform.
>
> What I tried was:
>
> Image1.Picture = Range("E3").Value
>
> where Range("E3") contained C:\Users\Dad\Desktop\test.png.
>
> Is this do able? If so could someone point me in the right direction.



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Drivers to WinXP WIM Image via System Image Manager Ben Windows XP Setup 3 29th Oct 2007 09:14 PM
Control image property locking image file even after image cleared steve Microsoft VB .NET 4 6th Jul 2006 02:57 AM
Adding Some Javascript to an ASP:IMAGE control xanthviper@xanthviper.com Microsoft ASP .NET 1 26th Sep 2005 06:34 PM
Preview image before adding to image control Tom Microsoft Access Form Coding 4 23rd Feb 2005 07:54 AM
Adding an logo-image/tekst to an existing image. Richard Microsoft ASP .NET 6 22nd Jun 2004 09:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:31 AM.