Excel VBA for highlighting Cells

KurmallyIsmael

New Member
Joined
Apr 7, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi,
Please help with a VBA code to display the highlighting of cells coler pop up and choosing our color to apply to the cells (by pressing a shortcut like ctrl+h) instead of doing same from the ribbon.

So, for e.g, if I am on Cell A6 and I want to highlight this cell with Purple color, I want to do same just by pressing ctrl+h and then choosing the purple color instead of choosing it from the ribbon.

Grateful for your help...EnjoyExcel :)
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Code:
Sub Get_Colors()
    Application.Dialogs(161).Show
End Sub

Developer - Macros (Select "Get Colors") - Options - Put an "h" in the little window to the right of "Crtl+"
 
Upvote 0
Code:
Sub Get_Colors()
    Application.Dialogs(161).Show
End Sub

Developer - Macros (Select "Get Colors") - Options - Put an "h" in the little window to the right of "Crtl+"
Hi,
I tried it but it gave error saying Run-Time error "1004"
Any idea?
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,312
Members
452,634
Latest member
cpostell

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