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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,216,113
Messages
6,128,907
Members
449,478
Latest member
Davenil

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