D
Dean Slindee
Notice the one 'LATE BINDING ERROR line at the bottom, the rest of the code
is just the context.
How can this one line be coded to comply with Option Strict ON?
'== Calling form =============================
Public arrStatus(3) As String
'housekeeping
arrStatus(0) = "Ready"
arrStatus(1) = ""
arrStatus(2) = Date.Now.ToShortDateString()
arrStatus(3) = Date.Now.ToShortTimeString()
Call FormStatusBarPaint(Me, arrStatus)
'=== Called function ==========================
Public Function FormStatusBarPaint(ByVal frm As Form, _
ByVal strArray As Array) As Integer
Dim ctl As New Control
Dim sbr As StatusBar
Dim int As Integer
Dim intBounds As Integer
intBounds = strArray.GetUpperBound(0)
For int = 0 To intBounds
sbr.Panels(int).Text = strArray(int) 'LATE BINDING ERROR
Next
End Function
Thanks,
Dean Slindee
is just the context.
How can this one line be coded to comply with Option Strict ON?
'== Calling form =============================
Public arrStatus(3) As String
'housekeeping
arrStatus(0) = "Ready"
arrStatus(1) = ""
arrStatus(2) = Date.Now.ToShortDateString()
arrStatus(3) = Date.Now.ToShortTimeString()
Call FormStatusBarPaint(Me, arrStatus)
'=== Called function ==========================
Public Function FormStatusBarPaint(ByVal frm As Form, _
ByVal strArray As Array) As Integer
Dim ctl As New Control
Dim sbr As StatusBar
Dim int As Integer
Dim intBounds As Integer
intBounds = strArray.GetUpperBound(0)
For int = 0 To intBounds
sbr.Panels(int).Text = strArray(int) 'LATE BINDING ERROR
Next
End Function
Thanks,
Dean Slindee