仅供参考..GetSchedules 函数中存在一个错误,该错误导致程序在读取注册表以获取已定义计划的列表时失败。如果不存在任何计划,则会生成致命错误。
GetSchedules 函数需要在 modCount 模块中替换。
- Public Function GetSchedules() As Variant
- Dim MySettings As Variant, intSettings As Integer
- Dim Dummy(0, 0) As Variant
- MySettings = GetAllSettings("ScheduleCreator", "Schedules")
- On Error GoTo EmptyVar
- If UBound(MySettings, 1) >= 0 Then
- GetSchedules = MySettings
- End If
- GoTo EndSub
- EmptyVar:
- GetSchedules = Dummy
- EndSub:
- End Function
在调用函数(form initialize)中,将函数末尾的For X循环替换为:
- For X = 0 To UBound(Schedules, 1)
- If Schedules(X, 0) "" Then
- Set Lbl(X + 1) = New ScheduleLink
- ReDim Preserve Lbl(0 To (UBound(Lbl) + 1))
- Lbl(X + 1).Caption = Schedules(X, 0)
- Lbl(X + 1).Tag = Schedules(X, 0)
- End If
- Next X
我添加了一些其他函数,只要我将它们全部解决,我就会发布新代码。 |