![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I am familiar with declaring global variable in a module from Excel. But when I try to do the same thing in Outlook they lose their value.
This is in a module: Public EndLINXDate As Date This is the code for my form: Private Sub UserForm_Initialize() LINXDateBox.Value = Format(GV.EndLINXDate, "mm/dd/yyyy") End Sub Private Sub LINXDateOKB_Click() On Error Resume Next Err.Clear GV.EndLINXDate = Format(LINXDateBox.Value, "mm/dd/yyyy") If Err.Number 0 Then LINXDateBox.Value = "" Else Unload Me End If End Sub I can store a value and see it when I bring the form up again. But if I close and re-open Outlook the variable has lost its value. How can I fix this? Erik |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Global Variables/Session Variables | dch3 | Outlook and VBA | 2 | May 31st 07 02:11 PM |
variables? | sensible | Outlook Express | 2 | October 16th 06 03:34 AM |
Accessing add-in's global variables | [email protected] | Add-ins for Outlook | 4 | September 24th 06 07:28 AM |
Sessions and Variables | Ian Mackenzie | Outlook and VBA | 1 | March 9th 06 03:35 PM |