Import a module from a file using VBA in Microsoft Excel

In this article, we will create a macro to import a module to the active workbook. We will be using Filename.bas as a module, which we want to import...

Delete module content using VBA in Microsoft Excel

It's not possible to delete all kinds of modules, you can't delete the codemodules for worksheets, charts and ThisWorkbook. In these modules you have...

Delete all macros in a workbook/document using VBA in Microsoft Excel

If you are working with countless macros & you want a macro to erase all the existing codes from the current excel workbook then the following art...

Delete a procedure from a module using VBA in Microsoft Excel

  In this article, we will create a macro to delete another macro from a module. We are using Module1, which contains SampleProcedure as the sa...

Delete a module using VBA in Microsoft Excel

  In this article we will create a macro to delete module from the workbook. We will be using the MainModule as raw module. We want to get r...

Create a new module using VBA in Microsoft Excel

In this article, we will create a macro to insert a new module in an Excel workbook. Before running the macro, we need to specify the type and name o...

Copy modules from one workbook to another using VBA in Microsoft Excel

With the macro below you can copy modules from one workbook to anaother: Sub CopyModule(SourceWB As Workbook, strModuleName As String, _ TargetW...

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.