LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default paste comment text to right of cell

i'm trying to paste comment text to the right of the commented cell,
but first i need to insert blank columns in which comments can be
pasted.

the macro is supposed to select all cells with comments, change the
selection all columns with comments, insert a new column to the right
of the selections, and paste the comment text (minus username) into the
new blank cell.

the rest of the macro works, but when i try to insert new columns to
the right of the selection i get an error 1004: cannot use that command
on overlapping sections. any ideas? here's what i have so far:

Sub comment_macro()

Dim CommentCells As Range
Dim MyCell As Range

ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts).Select

Set CommentCells = Selection

Selection.EntireColumn.Select
Selection.Insert Shift:=xlToLeft

CommentCells.Select

For Each MyCell In CommentCells
MyCell.Offset(0, 1).Value = Mid$(MyCell.Comment.Text,
InStr(MyCell.Comment.Text, ":") + 1)
Next MyCell

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to paste text into a comment box using toolbar commands Halifax New Users to Excel 4 January 18th 09 05:45 AM
how do I paste excel text into a comment box? Bonnie Excel Discussion (Misc queries) 1 December 17th 06 09:02 PM
Can I paste information (from several cells) into a cell comment? eli Excel Discussion (Misc queries) 0 January 12th 06 11:47 PM
Remove text from Comment and paste into cell BernzG[_11_] Excel Programming 3 August 4th 05 11:52 PM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM


All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"