Simple macro question...

  FewWords 21:44 17 Jul 2008
Locked

Excel 2007 on MS Vista machine:
I need help with a very simple macro. I am attempting to create a note entering feature that works as follows:

I enter notes into a cell, click a button and the macro cuts and pastes the notes into a different cell which already contains text. The main focus is to have the macro cut and paste the text to the END of the previously entered notes. The catch is that I have a list of 25 clients next to which I have checkboxes, and a textbox that notes appear in when the checkbox is checked. The macro will have to paste the notes into a correct cell, depending on which textbox is checked.

In addition I have very little experience with VBA and would appreciate to be as detailed as possible. Thank you very much!

  VoG II 09:09 18 Jul 2008

This may get you started. It appends the contents of the selected cell to the comment of the cell one to the right.



Sub CommentTheCell()
Dim txt As String, newtxt As Variant
newtxt = ActiveCell.Value
If newtxt = False Then Exit Sub
txt = ActiveCell.Offset(0, 1).NoteText
If txt <> "" Then
newtxt = txt & Chr(10) & newtxt
Else
newtxt = newtxt
End If
ActiveCell.Offset(0, 1).NoteText Text:=newtxt
End Sub

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Best phone camera 2017

Stunning new film posters by Hattie Stewart, Joe Cruz & more

iPad Pro 10.5in (2017) review

28 astuces pour profiter au mieux de votre iPhone