LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro to display pictures

I am trying to set up a macro that will display a picture depending on the
value in cell G2. Here is the macro, it does not work...any ideas??


Sub Macro2()
'
' Macro2 Macro
' Macro recorded 04-02-2008 by Capt. W. D. Sammons
'

'
Range("H3").Select
if(g2=1.0,ActiveSheet.Pictures.Insert("C:\Document s and
Settings\Sammonsw\Desktop\GenAware\1.1 EXPLOSIVES.jpg").Select, _
if(g2=2.1,ActiveSheet.Pictures.Insert("C:\Document s and
Settings\Sammonsw\Desktop\GenAware\2.1 n FLAM GAS.jpg").select,"X"))
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 144#
Selection.ShapeRange.Width = 147#
Selection.ShapeRange.Rotation = 0#
Range("H12").Select
End Sub


If there is an easier way I would love to know, I have about 16 different
pictures that I want to be able to display

Thanks
Capt Samm
 
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
How do you export pictures from my pictures file into a word docu Becky New Users to Excel 1 November 20th 09 07:02 PM
In Excel using URLs, how to display pictures stored on a server? jwpowers Excel Discussion (Misc queries) 1 August 20th 07 10:50 PM
How do I display embedded pictures in Excel as icons? dkpugh Excel Discussion (Misc queries) 2 November 28th 06 05:04 AM
Pictures.Visible question (after adding many pictures, they stop disappearing) Abe[_4_] Excel Programming 2 July 11th 06 05:02 AM
How do I install a hyperlink to 'My Pictures' to display a pix Redstella Excel Programming 2 March 28th 06 07:32 AM


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

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

About Us

"It's about Microsoft Excel"