Solved

Getting text for certain line in textbox

Posted on 2004-08-30
1
157 Views
Last Modified: 2010-08-05
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
Comment
Question by:mad_psyso
1 Comment
 
LVL 18

Accepted Solution

by:
JR2003 earned 100 total points
ID: 11936695
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now