ファイルの特定の場所を指定せずに、VBA を使用してハードディスクから csv ファイルを開く方法。
1 に答える
0
Sub GetCSV()
Dim sFile As String
Dim wb As Workbook
'You can get fancier with the "filter" argument, see the internet for more info
sFile = Application.GetOpenFilename("*.csv,*.csv")
'False means they clicked cancel
If sFile <> "False" Then
Set wb = Workbooks.Open(sFile)
'do stuff
wb.Close
End If
End Sub
于 2012-07-26T21:46:10.973 に答える