Hello :

 

Note that the macro should be in the Shipment-New.xls workbook :

 

Sub CopyComments()

Dim Rg As Range, C As Comment

Dim Sh As Worksheet, x As Range

Set Sh = Workbooks("Database.xls").Sheets("Sheet1")

With Sheets("Sheet1")

    For Each Rg In .Range(.[J12], .Cells(.Rows.Count, 10).End(xlUp))

        Set x = Sh.[J:J].Find(Rg.Value, , , xlWhole)

        If Not x Is Nothing Then

            Set Var = x.Offset(, 1)

            x.Offset(, 1).Copy

            Rg.Offset(, 2).PasteSpecial Paste:=xlPasteComments

        End If

    Next Rg

End With

End Sub

 

Regards.

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de Cab Boose
Envoyé : jeudi 7 juillet 2011 08:56
À : excel-macros@googlegroups.com
Objet : $$Excel-Macros$$ VBA Comment Box - Copy of

 

Hi 

Have a photo in a comments  box in Database.xls.  Also have a vlookup in 
another workbook Shipment-New.xls  to bring forward the text from the cell
into 
the wb.  This works great.  I also want to bring forward the comment box 
in the same cell from Database.xls  into Shipment-New.xls. 

Would like to use vlookup function but I believe not possible.  Is a
vba event better, and  do I use vba copy/paste special  macro, or is there a
better 
method. 

Thanks 

Charlie 




-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to