Posts

Showing posts from November, 2016

Basic Operation in VBA

Image
As we Know that VBA stands for Visual Basic Application developed by Microsoft and used for developing such type of Applications that control Excel and other Microsoft Applications like word and Power Point.So, from above descriptions you will have understood that how much  VBA is useful in our day to day life now a days Excel becomes part of business and our life also for storing any information and managing information we generally prefer to Excel.So in this session we discussed five basic Operations in VBA. These Operations are : )Find Last Row  )Find Last Column )Select Complete sheet )Print name of Worksheet )Print name of workbook 1.)Find Last Row  During any application development it is general work that we copy attributes of sheet and paste inside another sheet.for this purpose we have to need to count last row inside excel. Below is shown a Excel sheet which contains my daily expenses like food and travel. Now in this case if I have to perform any Operation

Static Keyword in Java

Image
The static keyword in Java is used for memory management mainly.In Java Static keyword is used with : Some Points Regarding Static Keyword in Java Static fields are initialized at time of class loading in Java,Opposite to instance variable which is initialized when you create instance of a particular class. ) Variable ) Method ) Blocks ) Nested Class 1.) Java Static Variable If we used a static keyword with a variable then this variable is known as static variable Some Points Regarding Static Variable : Static Variable is used to refer common property of all objects. Static variable gets memory only once in class area at time of class loading. Static variable makes our program more efficient. Example : public class StaticVariable { int roll_no; String name; static String college="PIET"; //Create Parameterize Constructor StaticVariable(int r,String n){ roll_no=r; name=n; } void display(){

VBA References

Image
Referencing in VBA is most important operation due to this operation we perform various tasks. In VBA we perform various types of Referencing operations Such as : ·          Referencing with cell        Referencing with one cell to another cell        Referencing to Row       Referencing to Column         Referencing to Selection Referencing with cel   During this We perform our operation referencing to cell.           Code : Sub referencingCells()            ThisWorkbook.Sheets(“Sheet1”).cells(2,1).value=”This is Referencing to Cell” End Sub        OutPut: Referencing with One Cell with Another Cell We reference our cell from one cell to another cell i.e by using this concept we take value of one cell into another cell. Note : This operation can be take place inside same sheet or inside another sheet also. Inside Same Sheet Note : Run a Micro use Alt + F8 Key Code: Sub referencingToSameSheet()  

VBA basic Operation

Image
In any programming language read and write are basic operations in previous blog we had written about hello world and in this blog discussed more about VBA Programming language. But before perform basic operations using VBA at first we will learn how to select cell from excel. Select Range and Write HelloWorld  in VBA  As we know that excel is basically a matrix which contains rows and columns and we perform our operations on these rows and columns. In Excel these rows and columns in a combined way are called as cell, hence basically here we performing our operation on cell and to perform operation on a cell we first select a cell, to select a cell we use Range function. Syntax :           Range(“A1”)     Or   Range(“A1:A5”) Example : Code: Sub basicVbaTut()           ThisWorkbook.Sheets("Sheet1").Range("A1").Value = "Hello world" End Sub Output: Read a Cell in VBA In VBA to read information from

Differences Between Sub Procedure and Functions

Functions Sub Procedures Functions are a set of reusable code which can be called anywhere in a program as per requirement. Sub Procedures are also like functions it can also be called anywhere in our program as per requirements. Functions may or may not return a value . While sub Procedures does not return a value. During calling a function Programmer have to use call keyword. While during calling Sub Procedure there is not requirement of call keyword. Syntax :   function excelvbaport() {   ‘Set of codes   } Syntax :   Sub excelvbaport()   ‘Set of codes   End Sub Functions are very useful to divide a big program into simple and short program. Similarly Sub Procedures are also divide a long program into short programs. Learn More About VBA Introduction to VBA
Synapse Techno: Introduction to VBA : VBA stands for Visual Basic Application. . It is an event driven Programming language by Microsoft   now a days   it is predominantly used...

Introduction to VBA

Image
VBA stands for Visual Basic Application. . It is an event driven Programming language by Microsoft   now a days   it is predominantly used with Microsoft applications such as MS –Excel , MS-Word, MS-Access. VBA Application MS-Excel Provides loads on inbuilt functions.MS-Excel Provides only basic inbuilt functions which may not be sufficient to perform complex calculations but by using VBA we can create our own functions and perform our desirable tasks How to Access VBA Editor  In excel windows Press “ALT +F11”  to open VBA editor .. Step 1:   At first open Excel sheet Step 2:  Follow Above Tricks and open VBA Editor will be open  which looks like this . Some Important VBA Terminologies  Modules : Modules is the area where code is written. In above figure there is no any modules. How to insert Module ??? To insert modules in VBA right click on Microsoft Office Objects and then  a window open and on that window a insert option