Simple macro question...

  FewWords 21:44 17 Jul 2008

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
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

Honor 9 Lite review

How Social Media has Propelled Political Graphic Design and Art in the Last Decade

The best kids apps for iPhone & iPad 2018

HomePod d’Apple : date de sortie, prix et fiche technique