vb这段写的有问题吗,主要怀疑 Dim sfilename As Date还是 as string,还有"getOutPath = sfilename"可以这样写吗,我概念还不大清楚
Public Property Let strOutPath(s As Variant)
theOutPath = s
End Property
Private Property Get getOutPath()
getOutPath = theOutPath
End Property
Dim sfilename As Date
sfilename = FormatDateTime(Now, 1)
getOutPath = sfilename
Set xlBook = xlApp.Workbooks.Open(getOutPath)
[解决办法]
Dim sfilename As string