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):




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--
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Watch MrExcel Video

Forum statistics

Threads
1,114,323
Messages
5,547,259
Members
410,782
Latest member
Colart
Top