Help with code

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a VS2008 application form using Visual Basic. In one of the form, I
have a textbox (txtPath) and a button with the code below. When I try to
assign txtPath to a file select in OpenfileDialog I got a blue line
underline the code.


Imports System.Windows.Forms

Imports System.Windows.Forms.OpenFileDialog

Public Class ProposalManagement

Private Sub btnOpenFile_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOpenFile.Click

Dim fdlg As OpenFileDialog = New OpenFileDialog()

fdlg.Title = "Select Document to files"

fdlg.InitialDirectory = "C:\"

fdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"

fdlg.FilterIndex = 2

fdlg.RestoreDirectory = True

If fdlg.ShowDialog = Windows.Forms.DialogResult.OK Then

Me.txtPath = fdlg.FileName <=== Error is here

End If


End Sub

End Class



SF
 
SF said:
Hi,

I have a VS2008 application form using Visual Basic. In one of the form, I
have a textbox (txtPath) and a button with the code below. When I try to
assign txtPath to a file select in OpenfileDialog I got a blue line
underline the code.

Me.txtPath.Text = fdlg.FileName



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4080 (20090515) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
SF said:
Hi,

I have a VS2008 application form using Visual Basic. In one of the form, I
have a textbox (txtPath) and a button with the code below. When I try to
assign txtPath to a file select in OpenfileDialog I got a blue line
underline the code.

Me.txtPath.Text = fdlg.FileName



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4080 (20090515) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Back
Top