OK guys and gals, i have a project that works just like a tip of the day project but i want to have a series of text files that it will randomly pick tips/quotes from, then randomly pick a quote from the txt file. i have included the code i use to load the project.
' The in-memory database of tips.
Dim Tips As New Collection
' Name of tips file
Const TIP_FILE = "TIPOFDAY.TXT"
' Index in collection of tip currently being displayed.
Dim CurrentTip As Long
Private Sub Form_Load()
Dim ShowAtStartup As Long
' See if we should be shown at startup
ShowAtStartup = GetSetting(App.EXEName, "Options", "Show Tips at Startup", 1)
If ShowAtStartup = 0 Then
' Set the checkbox, this will force the value to be written back out to the registry
Me.chkLoadTipsAtStartup.Value = vbChecked
' Seed Rnd
' Read in the tips file and display a tip at random.
If LoadTips(App.Path & "\" & TIP_FILE) = False Then
lblTipText.Caption = "That the " & TIP_FILE & " file was not found? " & vbCrLf & vbCrLf & _
"Create a text file named " & TIP_FILE & " using NotePad with 1 tip per line. " & _
"Then place it in the same directory as the application. "
ok so far this will ramdomly pick a quote from the TIPOFTHEDAY.txt file now how do i get it to do the same thing but now ramdomly pick from TIPOFTHEDAY.txt to TIPOFTHEDAY2.txt to TIPOFTHEDAY3.txt and so on??? amount of code will be increased on the amount of code i receive w/ comments telling me what is goin on.