add logo

shadow12345

Well-known Member
Joined
May 10, 2004
Messages
1,238
I would like a macro to add the file called logo.jpg on every sheet in a work book named outstanding payments... I would like it to appear in cell d 1 (its already sized to fit the sheet based on that

(the logo file is stored on c:\logo.jpg)

Anyone know if thats even possible?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Mr Excel -Shadow12345 _8/2/08
----------------------
Hi, Shadow12345
This worked for me using pictures from "My Pictures"
I should try this code in a new Workbook to start with, because every time you run the code it inserts a new lot of pictures.
This could save a lot of work deleting them if its not what you want
If it proves OK Paste the code into an Mt Macro or CommandButton on Sheet (1) of the Workbook "Outstanding payments"
When you have pasted the code , you will see two lines in green, If you remove the Inverted Commas from the front of these lines you can use them as part of the code, to adjust the size of your picture,if you need to.
Code:
Dim wks As Worksheet
Application.ScreenUpdating = False
For Each wks In ActiveWorkbook.Worksheets
wks.Select
wks.Pictures.Insert("C:\logo.jpg").Select
With Selection
    .Top = wks.Range("D1").Top
    .Left = wks.Range("D1").Left
    '.Height = 100
    '.Width = 200
End With
Next wks
Application.ScreenUpdating = True
Regards Mick
 
Upvote 0

Forum statistics

Threads
1,223,626
Messages
6,173,415
Members
452,514
Latest member
cjkelly15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top