Private Sub Form_DblClick()
Dim s As Integer
s = 1
FileCopy "E:\新建文件夹\第""&s&""轮.xlsx", "E:\新建文件夹\第""&s+1&""轮.xlsx"
Print "复制成功"
End Sub
文件名为第1轮,想通过每次改变s的值而实现每次在前一轮的基础上增加一轮。
但是这个编码不对,一直不行,求助大神。
Private Sub Form_DblClick()
static s As Integer ' long
s = 1
FileCopy "E:\新建文件夹\第" & s &"轮.xlsx", "E:\新建文件夹\第" & s+1 &"轮.xlsx"
s=s+1
Print "复制成功"
End Sub