Hi,
I wrote a Workbook_Open macro to create a custom menu and stored it in the ThisWorkbook module of my Personal.xls. I did this yesterday, and I’ve experienced some problems with Excel running macros from my Personal.xls since. Is this a practice to be avoided? I looked online and, while I didn’t see any counsel against doing so, no one in any code examples that I saw did it, either.
Thanks a lot.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Workbook_Open in Personal.xls (2003)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Workbook_Open in Personal.xls (2003)
- This topic has 6 replies, 4 voices, and was last updated 18 years, 3 months ago.
AuthorTopicWSJogoDoBicho
AskWoody LoungerJanuary 30, 2007 at 11:21 pm #439245Viewing 1 reply threadAuthorReplies-
WSpieterse
AskWoody LoungerJanuary 31, 2007 at 4:45 am #1049224I tend to put as little code in ThisWorkbook as I possibly can. For one: Editing in the VBA editor leaves behind all sorts of junk (you cannot see). Normal modules can be cleaned up by exporting, deleting and importing them. But the thisworkbook module cannot be removed; you must rebuild the workbook. Also, some code only works well in normal modules.
-
WSBrookBoy
AskWoody Lounger -
WSpieterse
AskWoody LoungerJanuary 31, 2007 at 1:47 pm #1049287Well, it’s not exactly about particular types of code, but the thisworkbook module is a class module and as such behaves itself differently than a normal module.
If you don’t have the habit of fully qualifying your objects, code in thisworkbook sometimes doesn’t work, where-as when you place the exact same cod ein a normal module it does.I have no examples at hand, because I’m speaking from experience I’ve had with other people asking questions in forums (like this one), which were solved by moving the code to a normal module.
Another thing I often do in the Workbook_open event is NOT call the initialisation routines directly. Rather I use Application.Ontime to set an event that will run the init routine.
The net effect is, that the init sub runs *after* Excel is fully loaded (including its addins).
-
-
-
WSJogoDoBicho
AskWoody Lounger
H. Legare Coleman
AskWoody Plus-
WSJogoDoBicho
AskWoody LoungerJanuary 31, 2007 at 3:07 pm #1049314HI Legare,
The problems were:
a) some macros in Personal.xls weren’t being found when I ran them.
a couple of crashes
c) This morning, I sent a new workbook to someone, and suddenly she got one of my personal toolbars on her screen, although of course the macros it runs weren’t present.
(We’ve got a heavily protected environment. I ran a full scan anyway and came up with no viruses etc.)
This last problem made me suspect that my xlb file was corrupt, so I deleted it. I also moved the code from thisworkbook in Personal per Jan. These two actions seem to have cleared up the problems.
Thanks.
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Asking Again here (New User and Fast change only backups)
by
thymej
1 hour, 58 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
2 hours, 4 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
1 hour, 56 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
7 hours, 50 minutes ago -
Setting up Windows 11
by
Susan Bradley
52 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
3 hours, 17 minutes ago -
Powershell version?
by
CWBillow
4 hours, 10 minutes ago -
SendTom Toys
by
CWBillow
14 hours, 34 minutes ago -
Add shortcut to taskbar?
by
CWBillow
8 hours, 6 minutes ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
1 day ago -
How can I install Skype on Windows 7?
by
Help
23 hours, 10 minutes ago -
Logitech MK850 Keyboard issues
by
Rush2112
6 hours, 6 minutes ago -
We live in a simulation
by
Alex5723
1 day, 14 hours ago -
Netplwiz not working
by
RetiredGeek
1 day, 1 hour ago -
Windows 11 24H2 is broadly available
by
Alex5723
2 days, 3 hours ago -
Microsoft is killing Authenticator
by
Alex5723
14 hours, 39 minutes ago -
Downloads folder location
by
CWBillow
2 days, 9 hours ago -
Remove a User from Login screen
by
CWBillow
1 day, 5 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
2 days ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
2 days ago -
Is it a bug or is it expected?
by
Susan Bradley
2 hours, 44 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
1 day, 23 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
23 hours, 14 minutes ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
2 days, 13 hours ago -
Multiple Partitions?
by
CWBillow
2 days, 14 hours ago -
World Passkey Day 2025
by
Alex5723
10 hours, 17 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
3 days, 22 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
1 day, 23 hours ago -
Cached credentials is not a new bug
by
Susan Bradley
4 days, 3 hours ago -
Win11 24H2 Slow!
by
Bob Bible
3 hours, 20 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.