Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All.......
Someone, (I don't remember who), sometime, (I don't remember when) was kind enough to post this fine UDF. Function copycomment(r As Range) Application.Volatile Dim whereami As Range Set whereami = Application.Caller If whereami.Comment Is Nothing Then Else whereami.Comment.Delete End If whereami.AddComment Text:=r.Value copycomment = "" End Function It works great, but now I have a user who wishes to also retain the FORMATTING from the copied cell as well as the text......is this possible? TIA Vaya con Dios, Chuck, CABGx3 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
UDFs are only supposed to change the value of a cell it is called from.
There are undocumented actions outside of this limited definition that can be done with a UDF, but they are unreliable and can lead to instability. I would consider mucking with comments to be among these undocumented actions. Instead of a UDF, I would hook up similar code to a worksheet event. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services, Inc. http://PeltierTech.com/WordPress/ _______ "CLR" wrote in message ... Hi All....... Someone, (I don't remember who), sometime, (I don't remember when) was kind enough to post this fine UDF. Function copycomment(r As Range) Application.Volatile Dim whereami As Range Set whereami = Application.Caller If whereami.Comment Is Nothing Then Else whereami.Comment.Delete End If whereami.AddComment Text:=r.Value copycomment = "" End Function It works great, but now I have a user who wishes to also retain the FORMATTING from the copied cell as well as the text......is this possible? TIA Vaya con Dios, Chuck, CABGx3 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and Past Values AND Formatting AND Text | Excel Discussion (Misc queries) | |||
How to force column formatting (text, date, etc) when loading a fixed width text file into an array? | Excel Programming | |||
Find formatting in text in cell, insert tags around formatting. | Excel Programming | |||
Copy text with formatting from an Excel cell into an embedded Word object? | Excel Programming | |||
How do I copy text formatting using a formula? | Excel Discussion (Misc queries) |