0
Private Sub Button3_Click_1(sender As Object, e As EventArgs) Handles
Button3.Click
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.Filter = "Csv Files|*.csv|txt Files|*.txt"
openFileDialog1.Title = "Select a File to import numbers"
Dim convert As String = ""
If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
Using SR As New System.IO.StreamReader(openFileDialog1.FileName)
Dim All_lines As String = SR.ReadToEnd
convert = ("Button_" & All_lines)
'Label43.Text = convert
Me.Button_(convert).PerformClick()
End Using 'closes file
End If
End Sub
我有一個CSV與數字文件:導入數字文件並執行performClick()
我想導入Csv或Txt文件與每個新行上的一個數字。 我的程序有相應的按鈕
我想讀每一行,這一切會罰款 我有按鈕從Button_0到Button_36
所有我想要做的就是Me.Button_(進口數).PerformClick () 所以每行我從文件 我要創建
Me.Button_2.PerformClick()
Me.Button_5.PerformClick()
Me.Button_6.PerformClick()
Me.Button_14.PerformClick()
Me.Button_25.PerformClick()
Me.Button_36.PerformClick()
enter code here
我不知道這是可能的閱讀 謝謝
我想提及的是,文件中的每一個新行都有一個數字 – Vincent