VBA

Moderators: PavlinII
Number of threads: 1673
Number of posts: 3078

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Image Control Posted by ISUBP on 12 Oct 2012 at 6:56 AM
Hello,
I listed the below code to show what else I've found online about my issue. This code works to pull an image from a file on my C drive according to what cell A1's contents are. This however only works on the sheet it is active on(It will only work if I manually change the value of A1). How can I populate cell A1 from a different sheet so that the picture then changes as well? Any help would be greatly appreciated!!!


Private Sub Worksheet_Change(ByVal Target As Range)

If Target <> Range("A1") Then Exit Sub
Select Case Target

Case "COM": Image1.Picture = LoadPicture("c:\MMS3DTEMP\COM.bmp")
Case "COMform": Image1.Picture = LoadPicture("c:\MMS3DTEMP\COMform.bmp")
Case "COMSHELL": Image1.Picture = LoadPicture("c:\MMS3DTEMP\COMSHELL.bmp")

End Select
End Sub



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.