0% found this document useful (0 votes)
20 views

VBA Lesson 11: VBA Coding Tips: Downloadable Tutorial On Excel Macros

This document provides a coding tip and exercise to demonstrate the importance of proper spelling in VBA code. The tip advises writing code using lowercase letters, as correctly spelled words will automatically capitalize the proper letters. The exercise has the reader copy incorrect code with misspelled words, then fix the spelling and observe the capitalization changes that results from proper spelling. The summary concludes by closing Excel without saving changes.

Uploaded by

prasadramanji07
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

VBA Lesson 11: VBA Coding Tips: Downloadable Tutorial On Excel Macros

This document provides a coding tip and exercise to demonstrate the importance of proper spelling in VBA code. The tip advises writing code using lowercase letters, as correctly spelled words will automatically capitalize the proper letters. The exercise has the reader copy incorrect code with misspelled words, then fix the spelling and observe the capitalization changes that results from proper spelling. The summary concludes by closing Excel without saving changes.

Uploaded by

prasadramanji07
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

VBA Lesson 11: VBA Coding Tips When you start assembling VBA words into sentences and

paragraphs, it is said that you are coding or developing VBA code. In this lesson you will learn important coding tips and many special VBA words. Here is a tip and an exercise that will give you an idea of what you will find in the complete lesson 11 of the Downloadable Tutorial on Excel Macros.

Coding Tip 1 Always key in your code in lower case letters. If the spelling is right, the necessary letters will be capitalized. If no letter gets capitalized .... check your spelling. Exercise 1-1 Step 1: Open a new workbook in Excel and use the ALT/F11 keys to go to the visual basic editor. Step 2: In the code window of any of the sheets copy/paste the following macro: Sub proTest() activecel.cop End Sub Notice that there are no capital letters in activecel.cop because both words are misspelled. Step 3: Add a second "l" to "activecell" and an "y" to "copy" and then click "Enter". The sentence now reads: Activecell.Copy with a capital "A" and a capital "C" because both words are spelled correctly. You now understand that significant letters are capitalised in each correctly spelled VBA word when you move away from the line. Step 5: Close Excel without saving anything

You might also like