想请问各位大大一下,
在定义Type的时候遇到固定或静态资料不能大于64K的问题,
以下程式码的默认矩阵大小为
wDay(31) 想改到366
Task(10) 想改到30
Project(17) 想改到50
基本上用默认的都会过,但大一点就会遇到64K的问题.
有去网络上找解法,大部分都是建议先不设再用Redim,
但试了很久,不知道是语法错误还是怎样,试了很久都不会过.
以下是我的写法
Dim Tester As Employee
ReDim Tester.Project(50).Task(30).EffortByDate.wDay(366)
这样子写这行会出现阵列超出范围的错误
如果只写
ReDim Tester.Project(50)
这样子这一行会过,
但下面有用到Tester.Project(0).Task(0).TaskName的那行反而出现超出范围错误
如果写
ReDim Tester.Project(50)
ReDim Tester.Project(50).Task(30)
这样子这两行会过,但结果和上面一样
下面有用到Tester.Project(0).Task(0).TaskName的那行反而出现超出范围错误
搞了很久都搞不定,
以下是我Type的定义,可否请各位大大帮忙看一下问题在哪边
感谢帮忙!
Public Type wRecord
wYear As Integer
wMonth As Integer
wDay() As String
wStatus As String
End Type
Public Type Work
TaskName As String
TaskStatus As String
EffortByDate As wRecord
End Type
Public Type wHandle
ProjectNumber As String
ProjectStatus As String
Model As String
Customer As String
Catogory As String
Task() As Work
End Type
Public Type Employee
Name As String
Project() As wHandle
End Type