+ Reply to Thread
Results 1 to 2 of 2

vba-copy pictures from comments in a column then paste to another column

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    hk
    MS-Off Ver
    Excel 2003
    Posts
    2

    vba-copy pictures from comments in a column then paste to another column

    hi all,
    In my worksheet,
    column B contained comments with pictures.
    I wish to extract the pictures in comments and paste the picture to corresponding column C
    (i.e. copy the picture contained in the comment of cell B2 and paste the picture to cell C2)

    My current macro:

    PHP Code: 
    Sub Macro1()

    Dim rngTemp As Range
    Set rngTemp 
    ActiveCell

    Application
    .ScreenUpdating False
    With ActiveCell
    .Comment.Visible True
    .Comment.Shape.Select
    .Comment.Shape.CopyPicture _
    Appearance
    :=xlScreenFormat:=xlPicture
    .Comment.Visible False
    End With
    ActiveSheet
    .Range("A1").PasteSpecial
    Application
    .ScreenUpdating True

    End Sub 

    however it can only deal with one cell and I need to move the cursor to each cell that has comments.

    Much appreciated if anyone could fix my code?
    I imagine that a simple loop function would do but couldnt come up with one...

    thanks

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: vba-copy pictures from comments in a column then paste to another column

    This seems to work:

    Please Login or Register  to view this content.
    Gary's Student

+ 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