OpenFileDialog doesnt work 
Author Message
 OpenFileDialog doesnt work

Hello,

I have a function to display an OpenFileDialog box but when it completes it
unloads my addin.

Dim ofd As New System.Windows.Forms.OpenFileDialog()
ofd.CheckFileExists = True
ofd.CheckPathExists = True
ofd.Multiselect = False
ofd.InitialDirectory = txtAutoCompletePath.Text
ofd.Filter = "Auto Complete files (*.txt)|*.txt|All files (*.*)|*.*"
ofd.FilterIndex = 1
ofd.RestoreDirectory = True
If (ofd.ShowDialog() = DialogResult.OK) Then
    txtPath.Text = ofd.FileName()
End If

Any Ideas?
Thanks
Simon



Sun, 06 Feb 2005 22:38:12 GMT  
 OpenFileDialog doesnt work
I tried that but it still does the same thing as before.

It closes my form and the addin becomes unavailable and have to re-add it.

Simon

Quote:

> Have you tried to simplyify?
>    Dim OF as new OpenfileDialog
>    if of.showdialog = Dialogresult.ok then
>      msgbox("We are good")
>    else
>      msgobx("We are not good")

> This will at least let you know the result of the box.

> Cade


> > Hello,

> > I have a function to display an OpenFileDialog box but when it completes
it
> > unloads my addin.

> > Dim ofd As New System.Windows.Forms.OpenFileDialog()
> > ofd.CheckFileExists = True
> > ofd.CheckPathExists = True
> > ofd.Multiselect = False
> > ofd.InitialDirectory = txtAutoCompletePath.Text
> > ofd.Filter = "Auto Complete files (*.txt)|*.txt|All files (*.*)|*.*"
> > ofd.FilterIndex = 1
> > ofd.RestoreDirectory = True
> > If (ofd.ShowDialog() = DialogResult.OK) Then
> >     txtPath.Text = ofd.FileName()
> > End If

> > Any Ideas?
> > Thanks
> > Simon




Mon, 07 Feb 2005 16:21:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Settnig OBJECT property doesnt work with <PARAM tag but works in VBScript

2. WebBrowser ActiveX object doesnt work

3. This code used to work, now i cant figure out why it doesnt now

4. code in mdb files doesnt work

5. .OnAction doesnt work

6. Application_Startup doesnt work any trime

7. SyncEnd event doesnt work

8. Tab doesnt work

9. why doesnt this function work as i expect?

10. This doesnt work in VB.NET

11. ctrl.GetNextControl doesnt work

12. MaxLength doesnt work, no matter what I do

 

 
Powered by phpBB® Forum Software