Greetings,
I was just given a WB with 60 WS in it that has a hundreds of text boxes in it. My task is to insert a jpeg signature (a picture of the bosses signature) into each of these rectangles at the click of a button. Using the macro recorder I came up with the following macro. Not wanting to have a macro for each rectangle of course, (or reformat the entire WB to get rid of the shapes...) can anyone help me tweak the code for the "active shape"? That way the boss only has to select the box he wants his signature in, and then click the command button.
Thanks for your help,
I was just given a WB with 60 WS in it that has a hundreds of text boxes in it. My task is to insert a jpeg signature (a picture of the bosses signature) into each of these rectangles at the click of a button. Using the macro recorder I came up with the following macro. Not wanting to have a macro for each rectangle of course, (or reformat the entire WB to get rid of the shapes...) can anyone help me tweak the code for the "active shape"? That way the boss only has to select the box he wants his signature in, and then click the command button.
Thanks for your help,
Code:
Sub RickSignature()
'
' This macro uses a JPEG of a signature as the fill of an textbox.
'
'
ActiveSheet.Shapes("Rectangle 137").Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 2#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.UserPicture _
"C:\Documents and Settings\rblunt1\Desktop\Rick.jpg"
End Sub