Re: $$Excel-Macros$$ macro for adding comments to cells

2011-01-26 Thread Seba
Hello Roberto, works like a charm:) I just have one additional question. How can I define the target range on a separate sheet. Example: Sheet1 = source range Sheet2 = target range And to make the matter even harder, the target range is transposed, so if source = a1:a10, target range = a1:j1 Th

Re: $$Excel-Macros$$ macro for adding comments to cells

2011-01-26 Thread roberto mensa
try Sub test() Dim rng As Excel.Range Dim v As Excel.Range Set rng = [a1:a10] For Each v In rng write_comment v.Offset(, 1), v Next End Sub Sub write_comment(rngc As Excel.Range, rngt As Excel.Range) If TypeName(rngc.Comment) = "Nothing" Then rngc.AddComment.Text End If rngc.Comment.Text C

Re: $$Excel-Macros$$ macro for adding comments to cells

2011-01-26 Thread ashish koul
can you attach the sample workbook On Wed, Jan 26, 2011 at 8:59 PM, roberto mensa wrote: > look here > http://www.contextures.com/xlcomments03.html#Picture > > regards > r > > > > 2011/1/26 Seba > > Hello, >> >> I recorded a macro which adds content from certain range of cells to >> another ran

Re: $$Excel-Macros$$ macro for adding comments to cells

2011-01-26 Thread roberto mensa
look here http://www.contextures.com/xlcomments03.html#Picture regards r 2011/1/26 Seba > Hello, > > I recorded a macro which adds content from certain range of cells to > another range of cells. Each cell serves as a content source for the > target cell comment. > > My problem is this. The s