Monday, August 8, 2016

How to call a macro from another workbook?

Executing macro from same workbook is a routine task in Excel automation. Many a times, We face a situation where we need to a call macro from another workbook. Sometimes, it's very useful to call a macro from another workbook which will help us optimize macro code. Also, it is very easy to modify the code in individual macro of separate workbook.










Taking consideration of these advantage of macro with separate workbook will be used to automate tasks which scheduled on specific time intervals.

Sunday, July 17, 2016

VBA code to delete multiple sheets at once!!!

Most of the time we face a situation where we need to delete multiple sheets for a workbook. it become a monotonous job when there are large number of sheets which should be deleted. Sometime, because of repetitive task user accidentally deletes useful worksheets. As a result, it consumes lot of productive time which is not a worth in reporting project.











Tuesday, July 12, 2016

How to refresh pivot table when source data update in Excel?

    Pivot table is one the most useful visualization is excel reporting projects. Its greatest strength is its ability to structure, summarize and display large amounts of data. Pivot tables can also be used to determine whether there is a relation between the row variable and the column variable or not. 

     Pivot table can display grand totals for columns, rows, or for the whole measure. It can also display subtotals for columns. Also, anyone can create a calculated field based on input data source. Using pivot table anyone can validate their input data in short time. which is very important feature in terms of data quality check.


Monday, July 11, 2016

How to validate if input file is excel workbook?

Input data validation is one of the most important activity in report generation process. Which will help user to avoid run time issues while performing report generation tasks. Thus, it is very vital to have input in proper format. To identify file could be a one of validation activity while automation the project.

This can be achieve with a small VBA function which will be used to identify if file is excel.

Thursday, June 30, 2016

How select folder using excel VBA code?

Many a times we need to select folder to get input data path during project automation. Which we will be the first activity before macro execution. Selecting folder using dialogue box is very vital task any any automation activity. it helps as a input data validation to use correct input data in further execution. Also, it help to achieve data quality in report automation task.




Folder selection can be implemented by writing a short VBA code,

VBA code to delete multiple picture from worksheet !!!

Use picture and images is very good practice to make excel projects more interactive, Sometimes, there is a need to delete pictures from the workbook. It will be quite tedious task to select each picture and delete it manually.

Such task can be automate using small excel VBA code. Which will delete all pictures from active worksheet.



Monday, May 30, 2016

How can we send email with attachment using VBA in excel?

Sending email is a routine task for all kind of industry. it may be reporting, marketing, data science, communication, retail industry and so on. It will become a tedious job when same kind of email needs to be sent over multiple stakeholders.

     Obviously, sending same kind of email with different kind of attachment is a quite time consuming and boring activity. Specially, when it comes to email marketing to send emails to various recipient including attachments specific to their needs.

Saturday, May 21, 2016

How to use SQL in excel VBA macros?

Using SQL queries is better way to handle large amount of data in database applications. also, it generates result within a seconds. As, we aware the SQL queries only can be used in Microsoft Access and Microsoft SQL server applications.



In fact, SQL queries can be used in Excel VBA projects to handle large amount of data. Which will enables you to optimize your code for time complexity and output will be generated in fraction of seconds. Which is the core requirement of any VBA automation project.


Wednesday, April 27, 2016

How to create new folder at runtime using excel VBA?

Maintain folder structure is a vital task in  automation projects. Sometimes, it is very essential to delete and create folders at runtime. to achieve this task user needs to add a code which will be create folder at runtime.

Since to create specific folder at runtime, user need to automate this task in excel macro itself. Automating new folder creation task not only maintain folder structure but also ensures quality of work if there are several several folders to be deleted and create at runtime.

Tuesday, April 12, 2016

How to delete a excel workbook from selected folder?

Delete specific workbook or excel file is a usual task in many reporting project. As a routine activity user needs to delete old report and create new one based on latest data. Performing delete activity seems to be very risky when it is a manual, specifically when folder contain several report with slightly change in names.

Since to delete old files from the specific folder, user need to automate this task in excel macro itself. Automating file deletion task not only accomplish 100% quality but also saves a lot time to delete old files if there are several files to be delete from the folder