I have a code in my program that is supposed to stop the program when I click a button to maje bolstop = true and here it is Code (Text): If bolstop = True Then lstResults.AddItem " " & Time & ": Program Stopped" cmduserAbStart.Enabled = True Exit Sub End If What is wrong with this I have to click the stopping button 10 times to stop it here is the stoping button code Code (Text): Private Sub Command5_Click() bolstop = True cmduserAbStart.Enabled = True lstResults.AddItem "Ending Program Please Wait" End Sub this is ticking me off And also can someone link me to a list box saving tutorial
The code to stop the program should work, but you will have to put it in more than only one position (if you're not makeing a for...next contruct)... And what do you mean to "save" listboxes??? As a file or as a registry key???
ok thanks I mean have a list box be saved as a texet file. I put that in multiple places but it still dosn't work
ok, so here is the code to save a ListBox as a Text file: 1. Create a common dialogue and name it "CD"; 2. The ListBox here is called List1 and the button Command1 3. Paste this code: Code (Text): Private Sub Command1_Click() On Error Resume Next Dim lngTemp As Long CD.DialogTitle = "Save Listbox" CD.InitDir = App.Path CD.Flags = &H4 CD.Filter = "Text Files (*.txt)|*.txt" CD.ShowSave If CD.Filename = "" Then Exit Sub Open CD.Filename For Output As #1 For lngTemp = 0 To List1.ListCount - 1 Print #1, List1.List(lngTemp) Next lngTemp Close #1 End Sub Done!!!
is there anyway I could have that stoping code better and where should I put the timer code and do I need a vb6 timer to use it