J
Jeff Jensen
I only want to run "Sub AddComment()" if the text in I9 doesn't fit in the
cell. How would I modify this code?:
Sub Finalize()
ActiveSheet.Unprotect
Range("B9:M9").Select
Selection.Insert Shift:=xlDown
Range("B7:M7").Select
Selection.Copy
Range("B9:M9").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Locked = True
Selection.FormulaHidden = False
Range("B9").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("C7:M7").Select
Application.CutCopyMode = False
Selection.ClearContents
AddComment
Range("C77").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub AddComment()
Range("I9").AddComment
Range("I9").Comment.Visible = False
Range("I9").Comment.Text Text:=Range("I9").Value
With Range("I9").Comment.Shape
..ScaleWidth 3#, msoFalse, msoScaleFromTopLeft
..ScaleHeight 1#, msoFalse, msoScaleFromTopLeft
End With
End Sub
Thanks,
Jeff
cell. How would I modify this code?:
Sub Finalize()
ActiveSheet.Unprotect
Range("B9:M9").Select
Selection.Insert Shift:=xlDown
Range("B7:M7").Select
Selection.Copy
Range("B9:M9").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Locked = True
Selection.FormulaHidden = False
Range("B9").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("C7:M7").Select
Application.CutCopyMode = False
Selection.ClearContents
AddComment
Range("C77").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub AddComment()
Range("I9").AddComment
Range("I9").Comment.Visible = False
Range("I9").Comment.Text Text:=Range("I9").Value
With Range("I9").Comment.Shape
..ScaleWidth 3#, msoFalse, msoScaleFromTopLeft
..ScaleHeight 1#, msoFalse, msoScaleFromTopLeft
End With
End Sub
Thanks,
Jeff