+ Reply to Thread
Results 1 to 4 of 4

Move a Picture to cell C1

  1. #1
    Bill (Unique as my name)
    Guest

    Move a Picture to cell C1

    I know how to move a picture around a sheet. Eg.,

    ActiveSheet.Shapes("Picture 1").Select
    Selection.ShapeRange.IncrementTop -5

    I would like to move a picture to a particular cell.

    Would you help me, please?

    Thank you in advance.


  2. #2
    Bill (Unique as my name)
    Guest

    Re: Move a Picture to cell C1

    I should be a little more clear about what I would like to do.

    I have a chessboard (colored cells) with pieces (picutes) on sheet.
    I would like to run a macro to place the pieces back in their original
    positions.
    Since they are in different places each time, what I might be looking
    for is a way to place them in a particular location on the sheet, not
    necessarily referring to a cell.

    Thanks again.


  3. #3
    Chip Pearson
    Guest

    Re: Move a Picture to cell C1

    Try

    Dim Pic As Picture
    Set Pic = ActiveSheet.Pictures(1)
    Pic.Top = Range("C1").Top
    Pic.Left = Range("C1").Left


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com



    "Bill (Unique as my name)" <[email protected]> wrote in
    message
    news:[email protected]...
    >I know how to move a picture around a sheet. Eg.,
    >
    > ActiveSheet.Shapes("Picture 1").Select
    > Selection.ShapeRange.IncrementTop -5
    >
    > I would like to move a picture to a particular cell.
    >
    > Would you help me, please?
    >
    > Thank you in advance.
    >




  4. #4
    Tom Ogilvy
    Guest

    Re: Move a Picture to cell C1

    or if putting them back on the "board" or to a specific square

    Dim Pic As Picture
    Dim s as String
    s = "SqrR2C3" ' name of square "pic" where you are placing the piece
    Set Pic = ActiveSheet.Pictures(1)
    With Activesheet.Pictures(s)
    Pic.Top = .Top + (.Height-Pic.Height)/2
    Pic.Left = .Left + (.Width - Pic.Width)/2
    End with



    --
    Regards,
    Tom Ogilvy


    "Chip Pearson" <[email protected]> wrote in message
    news:[email protected]...
    > Try
    >
    > Dim Pic As Picture
    > Set Pic = ActiveSheet.Pictures(1)
    > Pic.Top = Range("C1").Top
    > Pic.Left = Range("C1").Left
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    >
    > "Bill (Unique as my name)" <[email protected]> wrote in message
    > news:[email protected]...
    >>I know how to move a picture around a sheet. Eg.,
    >>
    >> ActiveSheet.Shapes("Picture 1").Select
    >> Selection.ShapeRange.IncrementTop -5
    >>
    >> I would like to move a picture to a particular cell.
    >>
    >> Would you help me, please?
    >>
    >> Thank you in advance.
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1