The program logic and user data are documented in comments so that future programmers can easily work on the same code.
It contains details like “developed by,” “modified by,” and “incorporated logic.” During execution, the compiler ignores comments.
In VBA, there are two methods available for showing comments.
First Method
‘Code description: This code to check the validations
‘Developed by : Fatcoder
‘Return Value : True / False
Second Method
REM Code description: This code to check the validations
REM Developed by : Fatcoder
REM Return Value : True / False
Example
Sub Comments_Demo()
'First Method
'Code description: This code to check the validations
'Developed by : Fatcoder
'Return Value : True / False
'Second Method
REM Code description: This code to check the validations
REM Developed by : Fatcoder
REM Return Value : True / False
End Sub