last late binding error

  • Thread starter Thread starter Dean Slindee
  • Start date Start date
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
 
Hi,

sbr.Panels(int).Text = strArray(int) .tostring


Ken
-----------------------
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
 
Dean Slindee said:
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?
[...]
ByVal strArray As Array) As Integer

'ByVal strArray As Array' => 'ByVal strArray() As String'.
 
Back
Top