common macros ready to use in every instance

leecavturbo

Well-known Member
Joined
Jan 4, 2008
Messages
679
i have a couple of macro's i use regular.
can these be loaded when i open excel so they are there to run on any workbook i open?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,395
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Yes - you need to move them to you Personal Macro Workbook if you have one. If you don't already have one, just start recording a macro and choose to save it in the Personal Macro Workbook - this will create the workbook for you. (You don't avtually have to do anything with the macro - just start then stop recording).
 
Upvote 0

leecavturbo

Well-known Member
Joined
Jan 4, 2008
Messages
679
ok thanks. i have absolutely no idea on how to record a macro or understand the code at all. basically you kind fellows have given me the codes (text) i need on here then somehow i have bludgened my way to find how to apply that code in a macro and run it. so i could do with some brief guidance from: once i have the code (text) now what? ;)
 
Upvote 0

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Another option is to create an Add-In containing the code. Takes a bit more work but it has advantages; others can use the macros too, difficult if they are in your Personal Macro Workbook.

Just saw your reply -- if you are only getting started, go for the Personal Macro Workbook.
Denis
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,395
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Which version of Excel are you using?
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,395
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Then it's:
Tools->Macro->Record new macro... and from the dropdown choose to store it in the Personal Macro Workbook. You should then see the Recording toolbar appear - just press the Stop button and you shoul dnow have a Personal Macro workbook (called Personal.xls) visible in the VBEditor. You can copy and paste your code into a new module in that workbook. The Personal Macro Workbook is automatically started up whenever you start Excel.
 
Upvote 0

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Personal Macro Workbook is a hidden workbook that opens every time you launch Excel.

1. Record a macro to do anything (eg, switch worksheets). You get the option of where to store it; choose Personal Macro Workbook. Once you have finishd the macro, stop the recorder

2. Windows > Unhide, and select Personal Macro Workbook

3. Alt+F8, select the macro name that you just recorded, click Edit

4. Copy the macros you actually want to use, and paste them over the junk one that you recorded. Save, and Alt+Q to return to Excel

5. Make sure you are in Personal Macro Workbook, and Windows > Hide.

6. Now you can run the macros by using Alt+F8 to bring up the dialog, and double-clicking the macro name. If you like you can also attach the macros to buttons.

Denis
 
Upvote 0

leecavturbo

Well-known Member
Joined
Jan 4, 2008
Messages
679
this macro was working now i get run time error 13?
. only thing that might be different in the sheet it worked on and the sheet it now doesn't is the none working sheet might have more than 1 empty cells in a column together
macroerror.png
 
Upvote 0

Forum statistics

Threads
1,191,320
Messages
5,985,964
Members
439,992
Latest member
NCWalker

We've detected that you are using an adblocker.

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.
Go back
Top