Announcement

Collapse
No announcement yet.

Fix Picture To Cell

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fix Picture To Cell

    When a picture is inserted into Excel - Insert-> Picture-> From File, the inserted Picture floats. Can the picture be tied/anchored to a given cell so that a user can not easily move it in the spreadsheet? Either an Excel or VBA solution would be very helpful. Thanks in Advance

  • #2
    A partial soultion would be to attach the following macro to your picture. It will prevent casual moving. You could also add a calculate or Worksheet Change Event to your worksheet that always moved the picture to where you wanted it, but that could be overkill.
    Sub Object1_Click()
    ActiveSheet.Pictures(Application.Caller).TopLeftCell.Select
    End Sub
    Last edited by Dave Hawley; January 9th, 2007, 14:34.
    Please do not U2U (private message) me directly for questions that should be posted to the forum; any such U2Us will be ignored.

    Comment


    • #3
      Thanks, Derk that worked. I do have a followup though. I noticed after I fixed it in place, that when I widen any row or column behind the picture, the picture grows accordingly. Do you know of any fix/code so that the picture stays the same size and does not grow accordingly?

      Comment


      • #4
        In the picture's properties (right click on the picture and choose Format Picture) there are several options. Select Move and don't size with cells.
        Please do not U2U (private message) me directly for questions that should be posted to the forum; any such U2Us will be ignored.

        Comment


        • #5
          Thanks Derk. What a great site this is.

          Comment

          Working...
          X