Posts

Showing posts from June, 2022

VBA Interview questions - screen updating

Image
Hello Readers, Welcome to Coding by Learning !!! 😀  Take this scenario. There is an automation requirement where there is a master data file. User manually copy paste some range/cell to master file. Lets consider user needs to copy from 20 files to master file. Developer  automated this manual entry/copy paste activity using VBA code. But after the deployment user feels while running the code, it keeps changing the input file, copying  required data, going to master file, pasting data to master file, going to input file, copying required data, pasting data to master file and the activity continues until loop runs. As a user system looks like flipping pages of book which does not look good. Basically users wants to see only output after running automation. System screen should stay in the VBA macro file until getting output. How you make the code user convenience. Here VBA concept screen updating comes into picture . It is question might be asked in almost all the VBA int...

How to cut / copy Data from one range to another range by VBA code

Image
 Hello Readers, Welcome to Coding by Learning !!! 😀  In this post lets look how to copy or cut data from one range to another range by VBA code How to copy Data from one range to another range by VBA code Lets look at the example table in sheet named "source_data". I have a table which has list of vehicle names. Data is present in 'A' column. Now I want to copy entire range of ‘A’ column to ‘B’ column. We know we have excel short cut Ctrl + C and Ctrl + V. But how to copy range from one range to another range by VBA code VBA Code: Output: Lets run the program (press F5). We will get following output. Data from range A:A is copied and pasted in to range B:B How to Cut Data from one range to another range by VBA code Take the same above table as example. Data is present in entire 'A' and 'B' column. Now I want to cut the data from range 'A:A' and paste into 'C:C' column. We have excel short cut Ctrl + X and Ctrl + V to do the same. But h...

Which course one should do with VBA to get the better job

Hello Readers, Welcome to Coding by Learning !!! 😀  VBA   is widely used language for Microsoft office automation. Since it is more used in Excel automation, it will add an advantage in interviews related to Excel reporting, Excel Data analytics, MIS teams openings (Management information system) and many business enabled functions (Teams will support data, back office works of it's parent companies).  It is widely used in Automation field. Because VBA is capable of automating manual activities of Word , Excel , Access , Power Point , Outlook , SAP , IBM Mainframe , Web automation .  Also it can be used along with Selenium to automate browser activities. Now coming to the question Which course one should do with VBA to get the better job. It is based on the field which we are choosing.  If you like to go for Data analyst, then I would suggest please learn ‘ R ’ language, Python data analytics (Libraries like Scikit learn, Pandas, NumPy), Tableau and Micr...

VBA Interview questions - Part 3 - Array concept

Image
Hello Readers, Welcome to Coding by Learning !!! 😀  Lets see interview questions on VBA array concepts. 1. What is array? Array is a group of elements of similar data types 2. How to declare a array variable? Syntax : Dim arrayVariableName(size) As Datatype Ex : Dim fruits(5) As String 3. What is ReDim keyword in VBA? Using ReDim keyword developer can redefine the size of an array 4. How to use ReDim in VBA? Syntax : ReDim arrayVariableName(size) As Datatype   Ex : ReDim fruits(10) As String 5. I have already stored some elements in the array, what will happen if I redefine the size? When you redefine the size of an array without preserve keyword, then already stored elements will be erased from the array 6. What is preserve keyword in VBA? Preserve keyword in VBA helps to retain already stored elements in the array even though it is redefined. Example :  ReDim Preserve fruits(10) As String 7. What is option base in VBA? Option base is related with array concepts....

Popular posts from this blog

VBA Interview Questions - Part 2 - Variables and Data types

VBA Interview questions - screen updating

VBA Interview questions - Part 3 - Array concept