Programming The VBA Editor - Created by Chip Pearson at Pearson Software Consulting LLC
This page describes how to write code that modifies or reads other VBA code. http://www.cpearson.com/Excel/vbe.aspx
I just wrote a code on VBA - using the guidance offered by hiker95, but i seem to be strugling to find the best way to save the macro without saving the workbook it initially created it on.
Code has to sit within a workbook. You can move code modules between workbooks by exporting and importing them or store the code within your Personal Macro Workbook if you want it to be available to you at all times.
To store the macro in the Workbook:
Click on Tools Macro Record New Macro…
In the box below Macro name:, enter the name of the macro
The box below Store macro in:
Pick This Workbook
And click on the OK button.
The macro will be stored in a Module in your VBAProject(your workbook name.xls).
To store the macro in/and create your Personal.xls file, so that you can run the macro on any active workbook:
Click on Tools Macro Record New Macro…
In the box below Macro name:, enter the name of the macro
The box below Store macro in:
Pick Personal Macro Workbook
And click on the OK button.
The macro will be stored in a Module in your VBAProject(PERSONAL.XLS) file.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.