「 项目开发记录 」 August 19, 2018
VBA创建目录、文件并写入
Words count 1.5k Reading time 1 mins.
Sub CreateFile()
‘定义变量
Dim PathG As String
Dim i As Integer
Dim str As String
Dim str_path As String
Dim FSO As Object
‘定义路径
PathG = “D:\VBAtest\software”
‘如果路径后面有 “"
‘类似于 “D:\VBAtest\software"
‘需要将后面的斜杠处理掉
If Right(PathG, 1) = “" Then
str = Left...