Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 8th, 2011, 02:54 PM
Registered User
 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Image Help!!!

Evening all,

I am a newbie with what I hope is a very simple issue which I can't solve.

I have a worksheet with a number of embedded images (inserted using the insert tool). These are called Picture1 and Picture2. I also have a userform (called userform1) which has an image control (image1). On the click on a button on the userform I want to programatically change the picture displayed in image1 in the form. I have worked out how to change this to a physical file on the hard disk using:

UserForm1.Image1.Picture = LoadPicture("c:\picture1.jpg")

What I would really like to do is use the embedded pictures in the worksheet. I have tried:

UserForm1.Image1.Picture = LoadPicture(Activesheet.shapes("Picture1"))

This doesn't seem to work and errors with 'Type Mismatch'.

If I change the code to:

UserForm1.Image1.Picture = LoadPicture(Activesheet.shapes("Picture1").Picture )

I recieve 'Object doesn't support this property or method'.

I'm sure that I'm pretty close but at the moment I can work it out.

Any help would be greaty appreciated.

Thanks

Simon





Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
How to: Upload image to server and save image name in db with other form info Clint PHP How-To 1 October 26th, 2009 05:50 AM
Copy kodak image edit control's image to clipboard vishwanathduddilla Visual Studio 2005 0 November 3rd, 2008 10:10 AM
set image on <asp:Image> stored in DataBase myself.panku ASP.NET 2.0 Professional 1 August 11th, 2008 10:41 AM
Document Image Processing (DIP) - changing image f ALcom Access 0 March 27th, 2006 06:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.