Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert cell "contents" into a "comment" | Excel Discussion (Misc queries) | |||
text string: "91E10" in csv file auto converts to: "9.10E+11" | Excel Discussion (Misc queries) | |||
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" | Excel Discussion (Misc queries) | |||
Run macro only if Field E10 = "WO ID" and AB10 = "Spec Sizing" | Excel Discussion (Misc queries) | |||
Comment Box Auto-sizing | Excel Worksheet Functions |