L
liz
I am following jay Freedman's advice about structuring my modules. I
have a user form and a module that will update some of the document
properties and save the file. My question relates to the user
selecting the Cancel button. I am hiding the form in the form Cancel
sub procedure, control will them pass back to the calling module which
looks like this:
Set frmCaptureFileProperties = New CaptureFileProperties
frmCaptureFileProperties.Show
Call UpdateDocumentProperties
Set frmCaptureFileProperties = Nothing
so on return from frmCaptureFileProperties.Show i could have an OK or
NOK situation. I would usually set a flag to indicate this, but how do
I hand this information back to the main module? I presume I could do
something like this if I can pick up the value of booUserCancelled:
Set frmCaptureFileProperties = New CaptureFileProperties
frmCaptureFileProperties.Show
if booUserCancelled = True goto ClearMemory
Call UpdateDocumentProperties
ClearMemory:
Set frmCaptureFileProperties = Nothing
Does booUserCancelled need to be Public, and if so where should I
declare it?
have a user form and a module that will update some of the document
properties and save the file. My question relates to the user
selecting the Cancel button. I am hiding the form in the form Cancel
sub procedure, control will them pass back to the calling module which
looks like this:
Set frmCaptureFileProperties = New CaptureFileProperties
frmCaptureFileProperties.Show
Call UpdateDocumentProperties
Set frmCaptureFileProperties = Nothing
so on return from frmCaptureFileProperties.Show i could have an OK or
NOK situation. I would usually set a flag to indicate this, but how do
I hand this information back to the main module? I presume I could do
something like this if I can pick up the value of booUserCancelled:
Set frmCaptureFileProperties = New CaptureFileProperties
frmCaptureFileProperties.Show
if booUserCancelled = True goto ClearMemory
Call UpdateDocumentProperties
ClearMemory:
Set frmCaptureFileProperties = Nothing
Does booUserCancelled need to be Public, and if so where should I
declare it?