|
从outlook中导出邮件到excel文件中,如果使用单元格赋值myWorksheet.cells(1, 1) ,可以运行,但是速度很慢,为了提高速度,我想使用字典,但字典内容保存到excel文件中时就报错,“运行时错误 438 对象不支持属性或方法“ ,以下最后一行就报错,死活不知道错在了哪里,请求诊断,万分感谢
.......
Set myWorksheet = myWorkbook.Sheets("Sheet1")
myWorksheet.cells(1, 1) = "接收时间"
myWorksheet.cells(1, 2) = "上级目录"
Set d = CreateObject("Scripting.Dictionary")
d.Add "a", "Athens"
d.Add "b", "Belgrade"
d.Add "c", "Cairo"
myWorksheet.Range("g1").Select
myWorksheet.Range("g1").Resize(d.Count, 1) = Application.Transpose(d.keys) |
|