Is it possible to change the font color of comments in Vba code...??

nirmal88

New Member
Joined
Jul 26, 2013
Messages
2

Hi all
This is my first post and so I thought to start of with a curious question.....?

Just wanted to know if there is any inbuilt option in excel that would make comments in my Vba code appear in some other color, which by default is green.??

My best regards :confused:
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
This is my first post and so I thought to start of with a curious question.....?

Just wanted to know if there is any inbuilt option in excel that would make comments in my Vba code appear in some other color, which by default is green.??
You can adjust the color, font and font size for comments as well as a few other part of your code. Go into the VB editor and click Tools/Options on its menu bar, then select the "Editor Format" tab on the dialog box that appears. For your direct question, select "Comment Text" from the list, click the Foreground dropdown arrow and change the Foreground color from the green that is currently selected to whatever color you want.
 
Upvote 0
Thanks for the quick reply Mr. Ricky, I have read lots of your posts, I must say that I'm your fan on this forum.
That should help, regards
 
Upvote 0
The OP was asking about changing the color of comments in the VBA editor (those code statements that you put in your code with an apostrophe in front of it). If that is what you are referring to also, then the answer is "no"... the setting I referred to in my response applies to all comments for code comments within the VBA editor.
 
Last edited:
Upvote 0
You can adjust the color, font and font size for comments as well as a few other part of your code. Go into the VB editor and click Tools/Options on its menu bar, then select the "Editor Format" tab on the dialog box that appears. For your direct question, select "Comment Text" from the list, click the Foreground dropdown arrow and change the Foreground color from the green that is currently selected to whatever color you want.
Mr. Rick, we can add a few years to our age since you wrote this, but I have MSO 365 and I need to change my comment color and following your suggestions it ain't on my version of Excel.
 
Upvote 0
Mr. Rick, we can add a few years to our age since you wrote this, but I have MSO 365 and I need to change my comment color and following your suggestions it ain't on my version of Excel.
It's still there in my 365

1737936730213.png
 
Upvote 0

Forum statistics

Threads
1,225,897
Messages
6,187,711
Members
453,435
Latest member
U4US

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