0
私人小組的button1_Click一個構件(BYVAL發件人爲System.Object的, BYVALË作爲System.EventArgs)把手Button1.Click錯誤BC30456 t '形式' 不是 '視窗'
With OpenFileDialog1
.FileName = String.Empty
.InitialDirectory = "C:\"
.Title = "Open Excel File"
.Filter = "Excel 97-2003|*.xls|Excel 2007|*.xlsx"
End With
Dim result As DialogResult = OpenFileDialog1.ShowDialog()
If result = Windows.Form.DialogResult.OK Then
Try
TextBox1.Text = OpenFileDialog1.FileName
GetExcelSheetNames(TextBox1.Text)
Catch ex As Exception
MsgBox("Error : " & ex.Message)
End Try
End If
End Sub
可能的SQL注入。使用參數來防止這種情況!處理你的對象也很重要。 – Codexer
呃?你的問題是什麼?你有什麼問題? – romulus001
爲我傳遞文本框表單登錄標記形式1提示和技巧 –