+ Reply to Thread
Results 1 to 7 of 7

Macro to open up a new blank comment for editing

Hybrid View

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 365
    Posts
    36

    Macro to open up a new blank comment for editing

    Excel 2013.

    I want to add to quick launch a button to open a blank comment in a cell, with the cursor in there set to edit it.

    I can use the 'add a comment' function which almost works, but the comment box opens with " :" and the cursor is on the second line. If I backspace twice it deletes the " :", and then the text is annoyingly in bold. I just want a blank comment box with no bold (or any other) formatting.

    Is there a way of doing this with a macro?

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Macro to open up a new blank comment for editing

    try this
      Commandbutton1_Click()
     Range("A1").AddComment
        Range("A1").Comment.Visible = False
        Range("A1").Comment.Text Text:=""
        With Selection.Font
            .Name = "Tahoma"
            .FontStyle = "Regular"
            .Size = 9
            .Strikethrough = False
            .Superscript = False
            .Subscript = False
            .OutlineFont = False
            .Shadow = False
            .Underline = xlUnderlineStyleNone
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .ThemeFont = xlThemeFontNone
        End With
        Range("A1").Select
    End Sub
    Teach me Excel VBA

  3. #3
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Macro to open up a new blank comment for editing

    if you want to open the comment box in edit mode ,just change this line

    Range("A1").Comment.Visible = False
    to true

  4. #4
    Registered User
    Join Date
    11-26-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 365
    Posts
    36

    Re: Macro to open up a new blank comment for editing

    NM.

    Thanks for the link it does exactly what I want!
    Last edited by Dave42; 01-13-2017 at 07:23 AM.

  5. #5
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Macro to open up a new blank comment for editing

    Good morning Dave42

    How about :
    SendKeys "+{F2}"
    HTH

    DominicB

  6. #6
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Macro to open up a new blank comment for editing

    http://www.contextures.com/xlcomments03.html
    This is a usefull link and I think DONE!

  7. #7
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: Macro to open up a new blank comment for editing

    You are welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Open a Comment for editing
    By Glanerch in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-17-2012, 09:25 AM
  2. [SOLVED] when editing a comment box
    By Melissa1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  3. when editing a comment box
    By Melissa1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  4. when editing a comment box
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  5. when editing a comment box
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  6. when editing a comment box
    By Melissa1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. when editing a comment box
    By Melissa1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  8. when editing a comment box
    By Melissa1 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1