dparteka
Member
Could someone help combine these two macros into one? The macro creates a comment… sets the properties to “Move and Size with Cell”… sets it to “Auto Size”… positions it as shown in the “ResetComments” macro below… enters the text “Employee No.: “… and then opens the comment for editing with the active curser positioned to the far right
Sub CreateComment()
ActiveCell.AddComment
ActiveCell.Comment.Shape.Placement = xlMoveAndSize
ActiveCell.Comment.Shape.TextFrame.AutoSize = True
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="Employee No.: "
Application.SendKeys "+{F2}"
End Sub
Sub ResetComments()
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.Top = cmt.Parent.Top + 3
cmt.Shape.Left = _
cmt.Parent.Offset(0, 1).Left + 12
Next
End Sub
Sub CreateComment()
ActiveCell.AddComment
ActiveCell.Comment.Shape.Placement = xlMoveAndSize
ActiveCell.Comment.Shape.TextFrame.AutoSize = True
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="Employee No.: "
Application.SendKeys "+{F2}"
End Sub
Sub ResetComments()
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.Top = cmt.Parent.Top + 3
cmt.Shape.Left = _
cmt.Parent.Offset(0, 1).Left + 12
Next
End Sub