Hi All,
I'm trying to use a couple of Arrays in some properties, the problem
I am having is this, when I try to use the properties in my form to set
the Column Start and Column Lengths they are all set to 0. The reason
being that instead of using the Property Let in the .ColStart(?) = ##
the Property Get is being processed, I found this out by steping thru
the code with F8. I was wondering HOW to get around this, is this caused
by the fact that VB6 will not allow you to make an Array Public?
Below is an excerpt of code from the Class and the Form.
----------------------- Class Code (clsExport) --------------
Option Explicit
' clsExport
.
.
.
Private lngColStart() As Long
Private lngColLen() As Long
.
.
.
Public Property Get ColStart() As Variant
ColStart = lngColStart
End Property
Public Property Let ColStart(ByRef v_varColStart As Variant)
ReDim Preserve lngColStart(intNumCols)
lngColStart = v_varColStart
End Property
Public Property Get ColLen() As Variant
ColLen = lngColLen
End Property
Public Property Let ColLen(ByRef v_varColLen As Variant)
ReDim Preserve lngColLen(intNumCols)
lngColLen = v_varColLen
End Property
----------------------- Form Code (frmMain) -----------------
Option Explicit
' frmMain
Dim objExportXcl As New clsExport
.
.
.
objExportXcl.NumCols = 10
.
.
.
objExportXcl.ColStart(2) = 31
objExportXcl.ColLen(2) = 14
objExportXcl.ColStart(3) = 45
objExportXcl.ColLen(3) = 16
.
.
.
objExportXcl.NumCols = 4
.
.
.
objExportXcl.ColStart(2) = 31
objExportXcl.ColLen(2) = 15
objExportXcl.ColStart(3) = 46
objExportXcl.ColLen(3) = 21
-----------------------------------------------------------
Any help would be greatly appreciated, and Thanks In Advance.
Ferlin.
I'm trying to use a couple of Arrays in some properties, the problem
I am having is this, when I try to use the properties in my form to set
the Column Start and Column Lengths they are all set to 0. The reason
being that instead of using the Property Let in the .ColStart(?) = ##
the Property Get is being processed, I found this out by steping thru
the code with F8. I was wondering HOW to get around this, is this caused
by the fact that VB6 will not allow you to make an Array Public?
Below is an excerpt of code from the Class and the Form.
----------------------- Class Code (clsExport) --------------
Option Explicit
' clsExport
.
.
.
Private lngColStart() As Long
Private lngColLen() As Long
.
.
.
Public Property Get ColStart() As Variant
ColStart = lngColStart
End Property
Public Property Let ColStart(ByRef v_varColStart As Variant)
ReDim Preserve lngColStart(intNumCols)
lngColStart = v_varColStart
End Property
Public Property Get ColLen() As Variant
ColLen = lngColLen
End Property
Public Property Let ColLen(ByRef v_varColLen As Variant)
ReDim Preserve lngColLen(intNumCols)
lngColLen = v_varColLen
End Property
----------------------- Form Code (frmMain) -----------------
Option Explicit
' frmMain
Dim objExportXcl As New clsExport
.
.
.
objExportXcl.NumCols = 10
.
.
.
objExportXcl.ColStart(2) = 31
objExportXcl.ColLen(2) = 14
objExportXcl.ColStart(3) = 45
objExportXcl.ColLen(3) = 16
.
.
.
objExportXcl.NumCols = 4
.
.
.
objExportXcl.ColStart(2) = 31
objExportXcl.ColLen(2) = 15
objExportXcl.ColStart(3) = 46
objExportXcl.ColLen(3) = 21
-----------------------------------------------------------
Any help would be greatly appreciated, and Thanks In Advance.
Ferlin.