[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VBA global variable lotus notes issue

Posted on 2009-12-23
3
Medium Priority
?
327 Views
Last Modified: 2013-12-18
Hi all,

I have an application that interacts heavily with Lotus Notes (email, databases, etc.) and I need to validate the user's Notes client (id file) password.  I have a userform that initializes when my app starts and a textbox for the password.  I declared the password variable globally because I want to be able to access it as many times as necessary until the app is closed.  The problem seems to be that the variable is destroyed when the form is hidden. Bear in mind, I am not unloading the form, simply hiding it, so I don't know why my variable will not retain the value from the textbox.

Thanks in advance for your help!!
0
Comment
Question by:bfreescott
  • 2
3 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 26116587
This is a VB-form and not a Notes form I hope? The variable is also a VB-variable? It would make it  lot easier for me to reply to your question, for I don't know at all how VB handles variables.

On the off-chance that you do mean a Notes variable: indeed, there is no such thing as a global variable in Notes. Three ways:
- a profile document
- some permanent document
- environment variables (they are stored in notes.ini)
0
 

Author Comment

by:bfreescott
ID: 26116776
I do mean a VB variable
0
 

Accepted Solution

by:
bfreescott earned 0 total points
ID: 26117423
I figured this out. I needed to declare the variable in a standard module and then define it in the form code.  After doing that, the variable is globally available for all other session activities.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question