Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Getting text for certain line in textbox

I have a textbox on my form Text1 and a Timer, Timer1

I want the timer to go to text1 and get the text from line1 and display it in a messageboxand then on the next internval goto line2 and get the text from that line and display it in a messagebox

Thanx in advance!
0
mad_psyso
Asked:
mad_psyso
1 Solution
 
JR2003Commented:
Private Sub Timer1_Timer()

    Static iTimesRun As Long
    Dim MyArray As Variant
    MyArray = Split(text1.Text, vbNewLine)
    MsgBox MyArray(iTimesRun)
    iTimesRun = iTimesRun + 1

End Sub
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now