【发布时间】:2016-05-05 23:41:58
【问题描述】:
我有一个类模块,其中在顶部我声明了一个集合
Dim orderCol As New Collection
在所有这些常用变量声明的下方是公共函数和填充该订单集合变量的子函数。
调用该函数后,它会脱离上下文,而且我推测它是一个类变量,因此不会脱离上下文。
这里有一部分代码最终可以让我自动完成数小时痛苦的文书工作……
'变量声明结束
Public Function start() As String
scrape_root_page
Application.Wait (Now + TimeValue("0:00:01"))
scrape_orders_list 'the orders collection variable gets filled up here
setup_workbook_temp_sheet 'however when it reaches this line, that orders collection variable is out of context
请告诉我如何让我的 orderCol 变量在该 scrape_orders_list 函数中填满后保持可用?
谢谢!!!
【问题讨论】: