Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I want my own special text (3 lines) inserted in comment box when I right click "New note" In Office 2007 I could do that with the vba shown below, but it does not work in Office 365. Does someone have a solution that works with Office 365. I am aware that it is possible to create a complete new button to the right click menu, but I want to use the existing "New note" I am running Windows 10 and Office 365 Kind regards, Kaj Pedersen This used to work in Office 2007 Insert in Module1 ================= Sub ThisIsMyOwnNote() Dim cmt As Comment Set cmt = ActiveCell.Comment If cmt Is Nothing Then Set cmt = ActiveCell.AddComment cmt.Text Text:="This is my own note" Else cmt.Text Text:=cmt.Text & Chr(10) End If End Sub ---------------------------------------------------------------------------------- Insert in This workbook ======================= Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.CommandBars("Cell").Controls("Insert comment").Reset End Sub Private Sub Workbook_Open() With Application.CommandBars("Cell").Controls("Insert comment") .OnAction = "Testfile.xlsm" & "!ThisIsMyOwnNote" End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automating Text to Columns -- can I auto-click "OK" on the message | Excel Programming | |||
Can I have "Shift-Click" or "Ctrl-Click" Code on Form List? | Excel Programming | |||
"Control" plus "click" doesn't allow me to select multiple cells | New Users to Excel | |||
I have to double click a cell for the "text" format to take | Excel Discussion (Misc queries) | |||
Worksheets("Brackets").DropDowns("Game10").Click | Excel Programming |