Size: 933
Comment:
|
← Revision 7 as of 2025-04-08 16:25:38 ⇥
Size: 1536
Comment: Cleanup
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
Excel VBA lives inside Excel workbooks. Macros can only be executed if its workbook is locally open. The '''personal workbook''' is always opened and available, and as such makes for an appropriate way to make macros or functions globally available. | A description of Excel's '''Personal Workbook''' functionality. |
Line 11: | Line 11: |
== Description == [[Excel/VBA|Excel VBA]] programs necessarily reside within a Excel workbook. Furthermore, an Excel VBA program can only be accessed or executed if that workbook is actively open for an end user. This would normally prevent the sharing of common code. The '''personal workbook''' is always effectively constantly open, and therefore can store globally-available programs. ---- |
|
Line 13: | Line 23: |
Simply save an Excel file with a macro embedded to: {{{C:\Users\USERNAME\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB}}} | The personal workbook is typically stored at {{{C:\Users\USERNAME\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB}}}. To initialize it, record a macro saved to the personal workbook. |
Line 20: | Line 32: |
=== Can't execute code in break mode === When debugging a macro or program, Excel offers to open the line of code that produced an error. This enters '''break mode'''. Note that the window title will include "[break]" when break mode is active. To execute break mode, select '''Run''' > '''Reset'''. |
Personal Workbook
A description of Excel's Personal Workbook functionality.
Contents
Description
Excel VBA programs necessarily reside within a Excel workbook. Furthermore, an Excel VBA program can only be accessed or executed if that workbook is actively open for an end user. This would normally prevent the sharing of common code.
The personal workbook is always effectively constantly open, and therefore can store globally-available programs.
Setup
The personal workbook is typically stored at C:\Users\USERNAME\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB.
To initialize it, record a macro saved to the personal workbook.
Troubleshooting
Can't execute code in break mode
When debugging a macro or program, Excel offers to open the line of code that produced an error. This enters break mode. Note that the window title will include "[break]" when break mode is active.
To execute break mode, select Run > Reset.
Personal Workbook Missing
Microsoft will periodically disable and delete your Personal Workbook. To re-enable:
In an Excel window, navigate to File > Options
In the popup, navigate to Add-ins
In a dropdown located near the bottom of the popup, select Disabled Items and Go
In the popup, select Personal Workbook and Enable
- Restart Excel