{"id":4458,"date":"2015-12-22T21:52:55","date_gmt":"2015-12-22T21:52:55","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/wp\/?p=4458"},"modified":"2018-04-02T16:56:16","modified_gmt":"2018-04-02T16:56:16","slug":"comment-uncomment-vba-code","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2015\/12\/comment-uncomment-vba-code\/","title":{"rendered":"Excel VBA Tips: How to comment or uncomment a Block of Code in VBA"},"content":{"rendered":"
\nDear Friends,<\/p>\n
Providing proper short descriptions for each of your functions or statements etc. makes your VBA code – easy to read, easy to understand by anyone who refers your code. <\/p>\n
Now the question is, how can you write description in English language in between your VBA code? VBA compiler will start giving compile error<\/a>. It is very simple by commenting those lines which you do not want get executed.<\/p>\n In VBA to comment a particular line which you do not want to get compiled or executed, you can type your line followed by single quote ( ‘ )<\/strong>. The complete line which is starting with single quote is ignored and does not get executed. All the commented lines get formatted in green color as shown below image. How to comment a line in VBA code <\/h2>\n
\n