LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default VBA "auto-sizing" comment box

Hi all,

The script I attached below will place what is typed in the cell into a
comment box, then replace the cell with "see comments" and delete the comment
box when "see comments" is erased.

Now, the question is...I have auto-size turned on...but why does the comment
box only format itself "length wise"?

Can I specify a comment box width and only have it autosize vertically?

Thanks!
_________________

If Target.Row 1 And Target.Column = 14 _
And Range(strRange).Value < "See Comment" _
And Range(strRange).Value < "" Then

Range(strRange).Value = "See Comment"
Range(strRange).Select
Range(strRange).AddComment
Range(strRange).Comment.Visible = True
Range(strRange).Comment.Text Text:=strComment
Range(strRange).Comment.Shape.Select True
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlTop
.ReadingOrder = xlContext
.Orientation = xlHorizontal
.AutoSize = True
End With
Range(strRange).Comment.Visible = False
Range(strRange).Select
'Range("A" & (Target.Row + 1)).Select

Else

If Target.Row 1 And Target.Column = 14 _
And Range(strRange).Value = "" Then

Range(strRange).Select
Range(strRange).ClearComments

End If

Range(strRange).Select
'Range("A" & (Target.Row + 1)).Select

End If
 
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
Convert cell "contents" into a "comment" Ryan Excel Discussion (Misc queries) 4 October 3rd 08 11:34 PM
text string: "91E10" in csv file auto converts to: "9.10E+11" [email protected] Excel Discussion (Misc queries) 2 August 12th 08 03:13 PM
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" ldiaz Excel Discussion (Misc queries) 2 March 16th 08 09:23 PM
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" ldiaz Excel Discussion (Misc queries) 2 March 15th 08 07:26 PM
Comment Box Auto-sizing Bill Davis Excel Worksheet Functions 1 April 13th 05 09:25 PM


All times are GMT +1. The time now is 06:24 AM.

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

About Us

"It's about Microsoft Excel"