View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 276
Default put the company logo in "A1" of sheets 4 to 44

The below code wil place a picture and size it to the marked sizes in ALL
sheets in a workbook for you,
modify to suit sheets i gues.

+++++++++++++++++++++++++++++++++
Sub Picture_Adder()
Application.ScreenUpdating = False
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim myPic As Picture
Dim res As Variant
Const sAddress As String = "A1"
Set WB = activeworkbook
res = Application.GetOpenFilename _
("Image Files (*.jpg), *.jpg")
If res = False Then Exit Sub

For Each SH In WB.worksheets
Set rng = SH.Range(sAddress)
Set myPic = SH.Pictures.Insert(res)
With myPic
.Top = rng.Top
.Left = rng.Left
myPic.ShapeRange.LockAspectRatio = msoTrue
myPic.ShapeRange.Height = 83.5 ' <======================= Modify
'myPic.ShapeRange.Width = 105 ' <====================== Modify
myPic.ShapeRange.Rotation = 0#
End With
Next SH
Application.ScreenUpdating = True
End Sub


+++++++++++++++++++++++++++++++++++++++
--
Regards

Corey
"Max Bialystock" wrote in message
...
What's the most efficient way to put the company logo in "A1" of sheets 4
to 44 of a workbook?