Macro Examples

Send Email Vba Code Excel Examples

Here are examples of  VBA MACRO  codes that allows to send emails within Ms Excel. It is not a rocket science to understand how to send the email using MS outlook via VBA code. Basically I use Excel to list the e-mail addresses and the name of the attachments.   Here is MACRO to send mail via CDO   Whenever macro sends out an e-mail,via MS outlook you have to authorize it Select  “yes” to authorize it . Below is code for sending…

Read More

Macro To copy the worksheet column to another sheets row.

Why use VBA when we can use transpose : This macro is made for those who work on large and complicated data files. To debug the MACRO you have to press F8 in Microsoft Visual Basic. Suppose if you have a larger spreadsheet where you have to backup and view,sort around 30 columns rom one part of the sheet to another part of the worksheet and on a daily basis. Then how will you do it. Yeah we know transpose..but…

Read More

Backup Excel Automatically Vba

Here is a Excel VBA code that will allow you to backup your active worksheet as per your defined time. It is by default “15 seconds” but you can change the period as per your needs.   Create a folder and name it “Test” in the partition C:\ The code in a module —————————— And this code is in a workbook module

Read More

How to remove excel macros completely at once ?

Unhide the sheet first  : just in case it is hidden right-click on the name of any sheet and select Unhide from the popup menu.This will show up the unhide sheet dialog box.Now choose the sheet and click ok and follow the steps given below. First of all press Alt+F11 to display the VBA Editor. At the side bar there will be a part that says Modules or forms.Now right click the module or form and hit Remove If you don’t…

Read More

Delete All Hidden Worksheets Excel

Why we need macro to do it? It sometimes become cumbersome to find and delete hidden tabs in a worksheet or hidden worksheets in a workbook so we are providing you straight forward method to do so.   Remove hidden worksheets macro : make sure that you have a backup copy of this workbook just in case.       Found this one on mrexcel here this macro will delete all sheets except the one you want to keep. Here…

Read More

Refresh cell value in Excel Using VBA MACRO

This VBA MACRO can help you to refresh selected cells. If you are working on a large and complex data then macros come handy.I found this one from a forum for my friend he used to work for a company where they have to crunch large workbooks. He had to refresh a particular cell or a group of cells again and again.   Here is the code. You have to place error handling near the ‘Set rng’ line. Here is…

Read More