I’m trying to make that quantum leap from “wizard” world to learning VBA, and have managed to get to pg 88 of “Beginning Access 97 VBA Programming” without too many mental failures. However, here I am at ‘Module Variables’ and can’t seem to figure out how to make the entry. It says to make an entry in the (Declarations) section of the module window under the Option statement, but when I open (General) > (Declarations) it is displaying “Option Compare Database” with the cursor at the beginning. When I move to the end and hit return it moves me out of the option statement into the sub below it. Are you supposed to delete “Option Compare Database” first? I’ve heard for fifty-two years that there is no such thing as a dumb question, but I may have finally discovered the exception.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Newbie Dumb Question (2002)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Newbie Dumb Question (2002)
- This topic has 21 replies, 6 voices, and was last updated 22 years, 4 months ago.
AuthorTopicWSbfxtrfcmgr
AskWoody LoungerNovember 8, 2002 at 4:08 pm #379141Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody LoungerNovember 8, 2002 at 4:29 pm #630311The top of a module could look like this:
Option Compare Database ‘ general options
Option ExplicitPublic Const Pi = 3.141592 ‘ a constant
Dim strName As String ‘ some variables
Dim lngAmount As LongSub Test() ‘ the first procedure
MsgBox “Hello World”
End SubTo see it (more or less) like this, you need to have checked “View Full Module” (don’t know the exact caption) in the options of the Visual Basic Editor. If this option is unchecked, you’ll just see bits at a time.
If you can’t insert a new line with the Enter key, you either have a keyboard problem or the Visual Basic Editor has gone haywire. See if closing all applications and restarting your computer helps.
Note: if you didn’t get Option Explicit, rush to Tools/Options… in the Visual Basic Editor and turn on “Require Declarations”. This forces you to declare ALL your variables and constants; it will save you a lot of grief later on. If declarations are not required, any typo will create a new variable without you knowing it: if you type lngAmuont instead of lngAmount, you’ll have a new variable that has no connection at all with lngAmount.
-
WSbfxtrfcmgr
AskWoody LoungerNovember 8, 2002 at 5:07 pm #630316Option Explicit was not checked, and even when I changed it in Options it did not appear in that module. I opened a new module and it DID appear. I went back and re-created the subs from the lesson and everything is working fine now. I suppose you can’t change the options in an active module once the routine has been entered? Anyway, thanks for getting me back on course. BTW, I went back to the original module and just deleated the text “Option Compare Database” and entered the text from the lesson, and the routine worked there as well (although it isn’t Option Explicit). Thanks again for your help.
-
WScarbonnb
AskWoody Lounger -
WSbfxtrfcmgr
AskWoody LoungerNovember 8, 2002 at 5:29 pm #630320Thanks! I suppose if I’m going to get anywhere with this VBA lesson, I’m going to have to get away from the “point and click” mentality. At 52 it’s even difficult getting past the “…old dog, new tricks.” syndrome. I managed to inherit XP Developer, which got me interested in this whole VBA thing to begin with. Having Developer, with my level of expertise, is a little like giving a Ferrari to a 13 year-old, but, what the hell; I’m willing to give it a shot!
-
WScarbonnb
AskWoody Lounger -
WSbfxtrfcmgr
AskWoody LoungerNovember 9, 2002 at 2:58 am #630413I really didn’t “inherit” it so much as it inherited me, I guess. The company I was working for went out of business, and I was offered some of the old equipment at “bargain” prices a few weeks later. Everything had kind of been piled up in one room with boxes of towers, keyboards, monitors, printers, etc. I really was looking to see if the old server was still around or maybe some of the later model PC’s, but most of the “good” stuff had been liquidated. I ended up taking a box that had two towers (one with a tape drive), a bunch of cable, and at the bottom a bunch of loose floppies, manuals, and CD’s. I was going to pull everything out and just dump it into another box, but the cables were all tangled up with everything and there were no empty boxes anyway – so I took the whole thing home to clean out there. It sat in the corner of my home office for 2 weeks before I started going through it all.
At the very bottom of the box, under all the manuals and scattered floppies was this UN-OPENED box labled “XP Developer”. I didn’t even know what it was. I opened it up and find 7 CD’s inside with things like Media Content, SQL Server, Exchange 2000, Visual SouceSafe, Developer, and Office XP w/FrontPage. I didn’t know what the other stuff was, but I knew what Office XP was and I got, well, a bit giddy. Really, I was like a kid on Christmas morning. Why? Because when I got there I found out that they weren’t taking any checks and I only had $47.00 in cash on me. I knew the tape drive was well worth the money (even though its rather dated) so they took what I had on me just to get rid of the “garbage”.
Sorry I rambled on so long, but it’s rare that I encounter such good fortune, and felt a need to share with someone who could appreciate the story (my daughters just looked at me blankly and said: “That’s nice”). Anyway, now I feel somehow obligated to learn VBA so as not to jinx the genie in the bottle so to speak.
-
WScarbonnb
AskWoody Lounger -
WScharlotte
AskWoody LoungerNovember 9, 2002 at 2:21 am #630401Now wait just a minute!
*I’m* over 52, and I’m learning something new every day!
And just for your information, you can always post your questions on Access VBA in the Access forum. There are more Access people hanging out there, and since Access uses different forms and controls than the rest of Office, you’ll probably get faster and more directed answers there … unless Hans and Bryan and a few others happen to be lurking in this forum when you post, of course.
-
WScarbonnb
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WScarbonnb
AskWoody Lounger -
WSbfxtrfcmgr
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSbfxtrfcmgr
AskWoody Lounger -
WSBowlie
AskWoody Lounger -
WScharlotte
AskWoody Lounger
-
-
-
WSHansV
AskWoody LoungerNovember 8, 2002 at 5:21 pm #630318The setting for Option Explicit is applied only to new modules, as you found out.
However, you can always add Option Explicit and/or Option Compare Database to any existing module, or remove it if you so wish. After all, a module is just text.
For your information: there are three forms of Option Compare. They determine how text is sorted and compared
Option Compare Binary: uses the internal representation of characters, so is case-sensitive. In this setting, A < a <
-
WSbfxtrfcmgr
AskWoody Lounger
-
-
-
-
WSDrew
AskWoody LoungerNovember 12, 2002 at 9:18 pm #631269I wrote a VBA tutorial that I have gotten a lot of good feedback on. Give it a whirl. It’s on my site (http://www.wolfwares.com) in the General section.
One thing though, it is written with Access 97 in mind, but I would hazard to guess that 99% of it will work right along with XP.
Drew
-
WScharlotte
AskWoody Lounger -
WSbfxtrfcmgr
AskWoody Lounger
-
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
-
Non Apple Keyboards
by
pmcjr6142
3 hours, 11 minutes ago -
How to delete your 23andMe data – The Verge
by
AJNorth
37 minutes ago -
7 common myths about Windows 11 (Microsoft AD)
by
EyesOnWindows
2 hours, 48 minutes ago -
Error updating to Win11 0x8024a205
by
bmeacham
2 hours, 39 minutes ago -
default apps
by
chasfinn
2 hours, 21 minutes ago -
Will MS Works 4 work in MS Win 11?
by
MileHighFlyer
10 hours, 16 minutes ago -
Adding links to text in Word 2000
by
sgeneris
2 hours, 17 minutes ago -
FBI warnings are true—fake file converters do push malware
by
Nibbled To Death By Ducks
3 hours, 54 minutes ago -
Classic and Extended Control Panel — no need to say goodbye
by
Deanna McElveen
32 minutes ago -
Things you can do in 2025 that you couldn’t do in 2024
by
Max Stul Oppenheimer
15 hours, 2 minutes ago -
Revisiting Windows 11’s File Explorer
by
Will Fastie
4 hours, 7 minutes ago -
Planning ahead for migration
by
Susan Bradley
4 hours, 46 minutes ago -
Yahoo mail getting ornery
by
Tom in Az
2 hours, 29 minutes ago -
Is Spectrum discontinuing email service?
by
Peobody
6 hours, 1 minute ago -
Practice what you preach! A cautionary tale.
by
RetiredGeek
2 hours, 33 minutes ago -
Looking for Microsoft Defender Manuals/Tutorial
by
blueboy714
6 hours, 45 minutes ago -
Win 11 24H2 Home or Pro?
by
CWBillow
3 hours, 16 minutes ago -
Bipartisan Effort to Sunset the ‘26 Words That Created the Internet’..
by
Alex5723
2 days, 13 hours ago -
Outlook new and edge do not load
by
cHJARLES a pECKHAM
3 days, 1 hour ago -
Problem using exfat drives for backup
by
Danmc
3 days, 1 hour ago -
I hate that AI is on every computer we have!
by
1bumthumb
2 days, 3 hours ago -
Change Info in the Settings window
by
CWBillow
3 days, 8 hours ago -
Attestation readiness verifier for TPM reliability
by
Alex5723
3 days, 14 hours ago -
Windows Update says that “some settings are managed b your organization”
by
Ed Willers
3 days ago -
Use of Gmail rejected.
by
CBFPD-Chief115
3 days ago -
WuMgr operational questions
by
Tex265
2 hours, 5 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
4 days, 5 hours ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
3 days, 6 hours ago -
Backing up Google Calendar
by
CWBillow
4 days, 12 hours ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
5 days ago
Recent blog posts
- Classic and Extended Control Panel — no need to say goodbye
- Things you can do in 2025 that you couldn’t do in 2024
- Revisiting Windows 11’s File Explorer
- Planning ahead for migration
- Woody Leonhard (1951–2025)
- What I learned from Woody Leonhard
- Windows Settings today
- Mail Merge magic in Microsoft Word
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.