last late binding error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dean Slindee

    #1

    last late binding error

    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.ToShor tDateString()

    arrStatus(3) = Date.Now.ToShor tTimeString()

    Call FormStatusBarPa int(Me, arrStatus)

    '=== Called function =============== ===========

    Public Function FormStatusBarPa int(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.GetUpp erBound(0)



    For int = 0 To intBounds

    sbr.Panels(int) .Text = strArray(int) 'LATE BINDING ERROR

    Next

    End Function



    Thanks,

    Dean Slindee


  • Ken Tucker [MVP]

    #2
    Re: last late binding error

    Hi,

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


    Ken
    -----------------------
    "Dean Slindee" <slindee@charte r.net> wrote in message
    news:Gs1ke.3314 2$rt1.27793@fe0 4.lga...
    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.ToShor tDateString()

    arrStatus(3) = Date.Now.ToShor tTimeString()

    Call FormStatusBarPa int(Me, arrStatus)

    '=== Called function =============== ===========

    Public Function FormStatusBarPa int(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.GetUpp erBound(0)



    For int = 0 To intBounds

    sbr.Panels(int) .Text = strArray(int) 'LATE BINDING ERROR

    Next

    End Function



    Thanks,

    Dean Slindee



    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: last late binding error

      "Dean Slindee" <slindee@charte r.net> schrieb:[color=blue]
      > 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[/color]

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

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      Working...