Macro recording is missing steps

Linda G

New Member
Joined
Nov 24, 2022
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Good afternoon!

Before I start, full disclosure, I am a total VBA/macro noob!

I have a spreadsheet containing several sheets. I cobbled together a VBA code I found on the internet, which is posted in the tab code, to change the tab colour depending on a value in a cell D1 of each sheet. The tab colours currently get updated by right clicking on the first tab name, view code, and then selecting "Run" and "Run sub/user form" from the menu in that window.

The spreadsheet is not going to be used by myself, so I want to make it as automatic as possible. I tried to make a macro to record all the updating steps, but I have found that nothing registers as soon as I right click the tab name..

Could someone kindly let me know what I have done wrong, or what I need to do to automate the process?

Very many thanks
 
To run the code
If you are in the editor you can click anywhere in your code and press F5

If you are on the sheet you can press ALT + F8, click on your macro name (if there is only one macro then it will automatically select it) and click Run

1669366026338.png


or on the Developer tab click the Macros icon (you'll probably have to make your Developer tab visible as it is hidden by default), which will take you to the same dialog box

1669365868849.png


or assign the macro to a button or a shape
 
Last edited:
Upvote 0

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.

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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