Insert Comment Hotkey - Excel 2007

Jeffack

New Member
Joined
Aug 27, 2009
Messages
3
Hi,

I'm making the not-so-fun transition from Excel 2000 to Excel 2007. I used to have a hotkey assigned so that Alt-C would insert a comment in the active cell - it was the same as if I clicked the "Insert comment" button. I am trying to replicate that functionality in Excel 2007.

It appears as though I will have to write a macro that does this, because there are no more custom toolbars with custom hotkeys as far as I can tell.

I tried the following macro (recommended on some website):

Sub InsertCommentNow()
Application.CommandBars.FindControl(ID:=2031).Execute
End Sub

However, this just inserts an empty comment and immediately closes / hides the comment dialogue box; in order to actually put something in the comment box, I have to right-click on the cell and click "Edit Comment", which defeats the purpose of having a keyboard shortcut.

This is driving me crazy! Thanks in advance for your help.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Yeh, they pretty much hijacked ALT for the ribbons;

Here's a snippet that will add comment to single cell or selected range:
Code:
Sub AddRangedComment()
 
    Dim rng As Range
    Set rng = Selection
    For Each c In rng
        With c
            .AddComment
            .Comment.Visible = False
            .Comment.Text Text:=InputBox("New Comment:", "Input", "{New Comment Text Here}")
        End With
    Next
Set rng = Nothing 
End Sub

Once Code is in Place:
Go to menu 'View'
Select Macros
Highligh the AddRangedComment
and click the Options button, there you can assign the key-stroke i.e. CTRL+SHFT+C as an ALT:biggrin:ernative
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,972
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top