Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default put the company logo in "A1" of sheets 4 to 44

What's the most efficient way to put the company logo in "A1" of sheets 4 to
44 of a workbook?


  #2   Report Post  
Posted to microsoft.public.excel.programming
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default put the company logo in "A1" of sheets 4 to 44

Thank you.


"Corey" wrote in message
...
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?





Reply
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
"Count" and "List" functions across sheets Meg Excel Worksheet Functions 0 October 14th 08 02:11 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Company logo under chart Dreamstar_1961 Charts and Charting in Excel 1 January 31st 08 12:39 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Company Logo Disappears G at Dawson Excel Discussion (Misc queries) 4 December 3rd 04 08:40 PM


All times are GMT +1. The time now is 03:13 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"