Inserting Image into Header/Problem with Other Users Machines

schongresh

New Member
Joined
Sep 11, 2012
Messages
10
Hi:

I have a procedure that inserts a company logo into the header of each sheet in a workbook--It currently points to:

.filename="C:\Users\sean.VFC\Desktop\RW_LOGO_Final_edited-3.jpg"

In order to make this available to those using other machines, I am hosting the image on a hosting site (PhotoBucket) that provides a URL link--

??How do I modify my vba to find this picture and insert it ??--

Code (vb):


select_all_icon.jpg


Code:
Sub Each_Sheet()
   Dim ws As Worksheet
   ForEach ws In ThisWorkbook.Worksheets
        ADDLOGO ws
   Next ws
EndSub
 
PrivateSub ADDLOGO(ws As Worksheet)
With ws.PageSetup.LeftHeaderPicture
        .Filename = "C:\Users\sean.VFC\Desktop\RW_LOGO_Final_edited-3.jpg"
        .Height = 32
        .Width = 33
    
        .ColorType = msoPictureAutomatic
    
        .CropBottom = 0
        .CropLeft = 0
        .CropRight = 0
        .CropTop = 0
   EndWith
   With ws.PageSetup.RightHeaderPicture
        .Filename = "C:\Users\sean.VFC\Desktop\RW_LOGO_Final_edited-3.jpg"
        .Height = 32
        .Width = 33
    
        .CropRight = -36
    
        .ColorType = msoPictureAutomatic
    
        .CropBottom = 0
        .CropLeft = 0
    
        .CropTop = 0
   EndWith
 
 
    ws.PageSetup.LeftHeader = "&G"
    ws.PageSetup.RightHeader = "&G"
EndSub

I'm working in Excel 2011 for Mac--But, I got a regular PC at work--

Some other solutions: ActiveSheet.Pictures.Insert doesn't seem to work--

It isn't locating the file--http://i1278.photobucket.com/albums/y505/schongresh/RW_LOGO_Final_edited-3-Copy_zps050e2348.jpg



If there is no way to use the host link, then any suggestions to solve the problem would be appreciated--

Thanks Again--
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,020
Messages
5,834,986
Members
430,331
Latest member
Syed Yasir Hannan

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
Top