我新建了一个文件夹,怎样把文件保存到这个文件夹里?
普通文件夹我是会的,但这个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()括号内只能是字符串啊?如何办到?
VBA怎样访问format格式文件夹
答案:2 悬赏:0
解决时间 2021-03-21 00:04
- 提问者网友:无悔疯狂
- 2021-03-20 20:24
最佳答案
- 二级知识专家网友:为你轻狂半世殇
- 2021-03-20 20:48
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)
全部回答
- 1楼网友:山鬼偶尔也合群
- 2021-03-20 22:25
虽然我很聪明,但这么说真的难到我了
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯