Hi,
Im running in the following issue which I cant get solved.
I have two forms.
when I click the savebutton a second form popsup and asks for the file name to save.
this works fine.
now when the user hits the savebutton. I want a listbox the be refreshed (this contains all files in a directory) on form one and close the second(save) form.
this is what i have
form one (frmSetup)
on form two (frmSave)
emailTabinit is the routine (located on form one) which reads the files.
I referenced form two(frmSave) on form one(frmSetup)
and form one (frmSetup) on form two (frmSave)
the error message, I get at formSetup.EmailtabInit() is:
Object reference not set to an instance of an object.
does this make sense to anyone?
help is appreciated
thanks in advance
Im running in the following issue which I cant get solved.
I have two forms.
when I click the savebutton a second form popsup and asks for the file name to save.
this works fine.
now when the user hits the savebutton. I want a listbox the be refreshed (this contains all files in a directory) on form one and close the second(save) form.
this is what i have
form one (frmSetup)
VB.NET:
[COLOR=#0000ff]Private[/COLOR][COLOR=#0000ff]Sub[/COLOR] SaveEmail()
[COLOR=#008000]' strTemplateText = Me.txtTemplateText.Text
[/COLOR][COLOR=#0000ff]If[/COLOR] blAdd [COLOR=#0000ff]Then
[/COLOR][COLOR=#0000ff]Dim[/COLOR] SaveForm [COLOR=#0000ff]As[/COLOR][COLOR=#0000ff]New[/COLOR] frmSave
SaveForm.Show()
[COLOR=#0000ff]Else
[/COLOR][COLOR=#0000ff]Dim[/COLOR] strFileName [COLOR=#0000ff]As[/COLOR][COLOR=#0000ff]String[/COLOR] = ""
SaveEmailTemplate(glstrEmailTemplateName, [COLOR=#0000ff]Me[/COLOR].txtTemplateText.Text)
[COLOR=#0000ff]End[/COLOR][COLOR=#0000ff]If
[/COLOR]
on form two (frmSave)
VB.NET:
[COLOR=#0000ff]
Private[/COLOR][COLOR=#0000ff]Sub[/COLOR] btnSave_Click([COLOR=#0000ff]ByVal[/COLOR] sender [COLOR=#0000ff]As[/COLOR] System.Object, [COLOR=#0000ff]ByVal[/COLOR] e [COLOR=#0000ff]As[/COLOR] System.EventArgs) [COLOR=#0000ff]Handles[/COLOR] btnSave.Click
SaveEmailTemplate(glstrEmailTemplateName, glstrEmailtemplateContent)
formSetup.EmailtabInit()
[COLOR=#008000]'finally
[/COLOR][COLOR=#0000ff]Me[/COLOR].Close()
emailTabinit is the routine (located on form one) which reads the files.
I referenced form two(frmSave) on form one(frmSetup)
VB.NET:
[COLOR=#0000ff]
Friend[/COLOR][COLOR=#0000ff]WithEvents[/COLOR] FormSave [COLOR=#0000ff]As[/COLOR] dbaccess.frmSave
VB.NET:
[COLOR=#0000ff]Friend[/COLOR][COLOR=#0000ff]WithEvents[/COLOR] formSetup [COLOR=#0000ff]As[/COLOR] dbaccess.frmSetup
the error message, I get at formSetup.EmailtabInit() is:
Object reference not set to an instance of an object.
does this make sense to anyone?
help is appreciated
thanks in advance