Computer Learning Zone CLZ Access Excel Word Windows

You can't just ask customers what they want and then try to give that to them. By the time you get it built, they'll want something new.

-Steve Jobs
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Microsoft Access 306    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 

Mubeezi Micah 

16 years ago
Dear Richard,

At 13:55 a VBA command does not run because we did not Dim our variable (My Reply). However at 18:16, when we use a variable my password without "diming" it, the VBA command runs perfectly. At first i thought it would bring an error but when i tried it on my database, it worked well without "Dim MyPassword". Why does it work in this particular case?
Help me and clarify. Thank you,

MICAH


Reply from Richard Rost:

You only NEED the Dim command if you have "option explicit" specified at the top of your VBA code. If that's there, VB will force you to EXPLICITLY declare all of your variables. If not, you don't have to. It's GOOD practice to leave this setting ON because it avoids mistakes in your code due to misspelled variables. However, it slows down the development process because you have to take the extra time to manually Dim all those variables. Your call.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Microsoft Access 306.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 9:57:13 PM. PLT: 1s