Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 2 of 2

Thread: Center Picture In Cell

  1. #1
    Join Date
    7th June 2006
    Posts
    22

    Center Picture In Cell

    I have a bitmap in a cell..

    I can size it but am having trouble trying to center the bitmap in the cell..

    is there a way to do this ?

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    7th March 2003
    Location
    Essex, England
    Posts
    11,314

    Re: Centering A Picture In A Cell

    This function takes a shape and a range of cell(s) over which to center the shape.

    VB:
    Sub aTest() 
         
        CenterMe ActiveSheet.Shapes(1), Range("D9") 
         
    End Sub 
     
    Sub CenterMe(Shp As Shape, OverCells As Range) 
         
        With OverCells 
            Shp.Left = .Left + ((.Width - Shp.Width) / 2) 
            Shp.Top = .Top + ((.Height - Shp.Height) / 2) 
        End With 
    End Sub 
    
    

    Cheers
    Andy


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Draw Line From Center Of Cell To Center Of Another
    By beringer in forum EXCEL HELP
    Replies: 3
    Last Post: August 13th, 2008, 16:15
  2. Replies: 1
    Last Post: April 10th, 2008, 05:01
  3. Center Across Selection Cell Value
    By bowman in forum EXCEL HELP
    Replies: 2
    Last Post: March 27th, 2007, 21:47
  4. Replies: 5
    Last Post: January 16th, 2006, 00:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno