What is Objects in Excel VBA ?
1. Application Object
A. Code
2. Workbooks Object
A. Code
B. Output
4. Sheets Object
In below image you can see when we write (Activeworkbook.Sheets. ) keyword in visual basic editor we got entire excel objects related to Sheets Object. We can use these all excel objects with ActiveWorkbook.Sheets. Object accordingly.
We are taking example of ActiveWorkbook.Sheets.Add . We can Add new worksheet in active workbook using this Object.
A. Code
5. Worksheet Object
Worksheet Object work with Worksheets of entire excel workbooks. We use Object Activeworkbook. for work with Active workbooks. Let;s see below example for Copy paste Data of Range("A1:B3") at Range("D4") .
A. Code
6. Worksheets Object
In below image you can see when we write (Worksheets. ) keyword in visual basic editor we got entire excel objects related to Worksheets. Object. We can use these all excel objects with Worksheets. Object accordingly.
We are taking example of Worksheets.Add . We can Add new worksheet in active workbook using this Object.
A. Code
We click Run button for Run the written code. New sheet added in Active workbook having Name (Sheet3)
Thanks for visiting @ Bexpertadvexel.com BlogsClick to Donwood Macro file Here
Click on the Link for Join us : Register_Course
We at BeXpert Advanced Excel offer state of the art Advanced Excel Coaching at Home. Even corporate professionals comes to us, for Advanced Excel Training in Gurgaon for the same state of the art database management education.
Other Services : We provide Automated Tools for reporting and analysis your business Data Automatically using some simple steps in User from and Command buttons.
No comments:
Post a Comment
Feel free to ask your questions regarding Ms Excel & VBA macros.