Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do you copy the contents of a range of cells to a single comment
(indicator)? I have a range of cells ("n12:n14"), and want to copy the contents into a single comment indicator within the activecell. anybody help? Thanks Mik |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 29 Apr, 23:11, Mik wrote:
How do you copy the contents of a range of cells to a single comment (indicator)? I have a range of cells ("n12:n14"), and want to copy the contents into a single comment indicator within the activecell. anybody help? Thanks Mik I Have an addition / further thought.... I wish to add the selected text from a 3 column listbox (userform) to the active cell as a comment (with indicator). Can anybody advise how this is done using vba? Mik |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created a small userform with a listbox and two commandbuttons on it (ok and
cancel). This was the code behind the userform: Option Explicit Private Sub CommandButton1_Click() Dim iCtr As Long Dim myStr As String If Me.ListBox1.ListIndex < 0 Then Exit Sub 'nothing chosen yet End If With Me.ListBox1 myStr = .List(.ListIndex, 0) _ & "--" & .List(.ListIndex, 1) _ & "--" & .List(.ListIndex, 2) End With With ActiveCell If .Comment Is Nothing Then 'no existing comment Else .Comment.Delete End If .AddComment Text:=myStr End With End Sub Private Sub CommandButton2_Click() Unload Me End Sub Private Sub UserForm_Initialize() Dim iCtr As Long With Me.ListBox1 .ColumnCount = 3 .ColumnWidths = "30,30,30" 'add some test data For iCtr = 1 To 3 .AddItem "A" & iCtr .List(.ListCount - 1, 1) = "B" & iCtr .List(.ListCount - 1, 2) = "C" & iCtr Next iCtr End With End Sub Mik wrote: On 29 Apr, 23:11, Mik wrote: How do you copy the contents of a range of cells to a single comment (indicator)? I have a range of cells ("n12:n14"), and want to copy the contents into a single comment indicator within the activecell. anybody help? Thanks Mik I Have an addition / further thought.... I wish to add the selected text from a 3 column listbox (userform) to the active cell as a comment (with indicator). Can anybody advise how this is done using vba? Mik -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Show Excel comment on mouseover but not the comment indicator | Excel Programming | |||
lookup cell reference and copy contents and comment from a range | Excel Worksheet Functions | |||
How do I copy the contents of a range of text cells and paste into one cell? | Excel Discussion (Misc queries) | |||
Copy column range of "single word" cells with spaces to a single c | Excel Discussion (Misc queries) | |||
How to I copy text from a range of cells to another single cell? | Excel Discussion (Misc queries) |