Results 1 to 1 of 1

Thread: to everyone

  1. #1
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290

    Talking Unanswered: to everyone

    hello all,

    members of this forum, i presume, are willing to help anybody.
    oke thats at last good thing in this world :-)

    on the other hand i think that everyone who created a solution to his programming problem is very proud to solve his problem, but is everyone also happy to share his solution to anybody ?

    well in that case i would

    in this case i like to share with you all this next function/sub which
    function makes an one dimensional array ( in this case a() ) with a readable txt, it looks for spaces to truncate lines of txt, and place delimitters for de split function

    activeprinter is an activex object
    and can be used for direct printing instead of using the form or report thing

    this activex object is a downloadable at :

    http://www5.software.rockwell.com/ap...2567400058f228

    --------------------
    Sub break()

    Dim a As Variant, strlen As Integer, Hinfo As String, strtel As Integer
    Dim lenar As Integer, I As Integer
    lenar = 80 ' line length for array elements
    strtel = 0 ' array element counter

    Hinfo = "" ' helpfield

    strlen = Len(pMemInfo) ' in this case a public variable

    Do While Len(pMemInfo) > lenar
    Hinfo = Hinfo + Mid(pMemInfo, 1, lenar)
    If Right(Hinfo, 1) <> " " Then
    I = 1
    Do While Right(Hinfo, 1) <> " " ' search for space
    If Mid(pMemInfo, lenar + I, 1) <> "" Then
    Hinfo = Hinfo + Mid(pMemInfo, lenar + I, 1)
    I = I + 1
    Else
    Exit Do
    End If
    Loop
    pMemInfo = Mid(pMemInfo, lenar + I)
    Hinfo = Hinfo & ""
    Else
    Hinfo = Hinfo & "" ' is a delimiter
    pMemInfo = Mid(pMemInfo, lenar + 1)
    End If
    strtel = strtel + 1 ' array element counter
    Loop
    Hinfo = Hinfo + pMemInfo
    a = Split(Hinfo, "")

    For lenar = 0 To strtel
    ActivePrinter.AddToBuffer Space(50) & a(lenar)
    Next lenar

    End Sub
    ----------------

    any questions ? react with a respons

    greetings

    emiel
    Last edited by emiel; 03-21-04 at 18:23.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •