C
captsamm(remove)
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:\Documents and
Settings\Sammonsw\Desktop\GenAware\1.1 EXPLOSIVES.jpg").Select, _
if(g2=2.1,ActiveSheet.Pictures.Insert("C:\Documents 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
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:\Documents and
Settings\Sammonsw\Desktop\GenAware\1.1 EXPLOSIVES.jpg").Select, _
if(g2=2.1,ActiveSheet.Pictures.Insert("C:\Documents 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