我新建了一个文件夹,怎样把文件保存到这个文件夹里?
普通文件夹我是会的,但这个format生成的文件夹,怎么弄都不行
'新建文件夹
If Dir("D:\12mZGJSapAPI", vbDirectory) <> "" Then
MkDir "D:\12mZGJSapAPI\" & Format(Time, "hh-nn")
Else
MkDir "D:\12mZGJSapAPI"
MkDir "D:\12mZGJSapAPI\" & Format(Time, "hh-nn")
End If
'保存文件
ret = SapModel.File.Save("D:\12mZGJSapAPI\" & Format(Time, "hh-nn")\& Format(Time, "hh-nn").sdb)
是不是save()括号内只能是字符串啊?如何办到?
tm=Format(Time, "hh-nn")
fname="D:\12mZGJSapAPI\" & tm & "\" & tm & ".sdb"
'ä¿åæ件
ret = SapModel.File.Save(fname)
fname="D:\12mZGJSapAPI\" & tm & "\" & tm & ".sdb"
'ä¿åæ件
ret = SapModel.File.Save(fname)
温馨提示:答案为网友推荐,仅供参考