更具體地說,爲什麼我在newFilename中的strarray(1)和strarray(2)之間得到一個空格?提前致謝!爲什麼我在兩個數組元素之間獲得空間?
Sub Button1_Click()
Dim orgFilename As String
Dim temp As String
Dim strarray(3) As String
Dim newFilename As String
orgFilename = Application.GetOpenFilename(FileFilter:="All files (*.), *.", Title:="Please select a file")
temp = Mid$(orgFilename, InStrRev(orgFilename, "\") + 1)
strarray(1) = Left(orgFilename, InStrRev(orgFilename, "\"))
strarray(2) = "processed_"
strarray(3) = temp
newFilename = Join(strarray)
End Sub