REAL-TIME

VBA Projects

Full Access with Source Code
  • Designed and Developed by PNRao

  • Full Access with VBA Source Code

  • Well Commented Codes Lines

  • Creative and Professional Design

Effortlessly
Manage Your Projects

120+ Project Management Templates

Seamlessly manage your projects with our powerful & multi-purpose templates for project management.

120+ PM Templates Includes:
  • 50+ Excel Templates

  • 50+ PowerPoint Templates

  • 25+ Word Templates

Share Post

In this tutorial we will see how to Edit Comment Macros in Excel VBA Code.

Edit Comment Macros in Excel VBA Code: Editing or Modifying VBA Code

Macro recorder will produce lot more code than required, it store almost every action which you are performing after start recording the macro. We can open the code and delete any statement if it is not required. If you want to see the code, you can open the code window (by pressing Alt+F11) and change the code as per your requirement. If you have little command on VBA, it will be easy to change the code as per your requirement.

Edit Comment Macros in Excel VBA Code: Commenting VBA Code

Comments are the statements which are not executable. We comment the statements if you do not want to execute it or if you want provide some information in the code. It is always a good practice to provide the comments while coding, it will be easier to read and maintain the the code as program size increases. And others also can understand your code easily if you provide some comments in the code. In this topic we will see how to provide the comments.

Comment statements are prefixed with a single quote(‘). See the following example code, comments will highlight in the green in code modules.

Sub sbExampleInputBox()
    'Declaring a variable to store the inputbox value
    'Dim statement creates a String variable called uName
    Dim uName As String
    
    'Accepting the value from the user and (right side statement)
    'assigning that value into the variable uName ('=' is an assignment operator)
    uName = InputBox("Please Enter Your Name")
    
    'Displaying the value storeed in the variable using Message Box
    MsgBox uName
End Sub

Effortlessly Manage Your Projects and Resources
120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

Save Up to 85% LIMITED TIME OFFER
Project Management Templates

All-in-One Pack
120+ Project Management Templates

Essential Pack
50+ PM Templates

Excel Pack
50+ Excel PM Templates

PowerPoint Pack
50+ Excel PM Templates

MS Word Pack
25+ Word PM Templates

Ultimate Project
Management Template
Ultimate Resource
Management Template
Project Portfolio
Management Templates
Categories: Excel VBATags: Last Updated: March 17, 2013

Leave A Comment