我有一個代碼,允許我在Excel工作簿中打開文件,但是我希望能夠在同一個工作簿中打開多個文件,名爲p00001,p00002 ,p00003等。有誰知道我可以如何編輯我的代碼來選擇所有以這種方式命名的文件,並在同一工作簿的不同工作表中打開它們? 我的代碼是: Sub Open_Workbook()
Dim my_FileName As Variant
my_FileName
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"
openFile
我試圖找到一種方法來關閉OpenFileDialog後重置初始/默認目錄。請看下面的例子: using (OpenFileDialog openFile = new OpenFileDialog())
{
// Example: This opens in the 'Desktop' directory
// User navigates to 'Documents' dir