Counting The Same Items!
i have been using search function but sometimes that is not enaugh, cause it is not functional for same items in a list box. Thats why i am looking for a filtering piece of code! for ex, when i type "tiiii" it will display all the items that start with "tiiii".
any help please?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Counting Items
how do i count the items in a listview?
lets say got 10 items, how to display 10? .. i mean count as well.. and if there are no items.. prompt error msg
Counting Items In Collection
Hi,
I want to execute what should be a simple task, namly to count the number of items in a collection (a collection of custom document properties in Word) but i can't find any information on msdn on how to do that. Can anyone help me?
Thanks a lot in that case.
Counting Items In A List
Visual Basic 6.0 w/Excel 2000
I have a column of entries that are sorted alphabetically. Is there a function or a VB 6 routine that will allow me to count the number of each occurrence that starts with "a", "b", "c", etc.
Thanks
Sheldon S. Cantor
Counting Menu Items
anyone know how to count menu items?
i have this project & the menu items vary per form.
is there any way that the system could count them without doing the manual initialization stuff..?
Counting Items In A Listbox.
Hey guys, I have a label called List3Countlbl and I was wondering if it was possible so that when a form load event occurs, the items in a list3 listbox gets counted and the result goes in the List3Countlbl??
Thanks!
Counting The Items In A Text File
Hi,
Here is another novice post from me"8=>))..
There are 15 labels to show "the randomly selected numbers" between "0,1 and 2"
I need to know how many "0s,1s and 2s" there are in my text file where I appended
the results of each event...
I mean ,I want my "newLabel" to write "There are five..1,four..0,and six..2 " in the file
the sum of which should equal=15
I think this should be something like counting each character in an array..but.."
thanks
VB Code:
Dim a, b, c, d, e, f, g, h, i, k, l, m, n, o, p As LongPrivate Sub Command1_Click()Randomizea = Int(Rnd * 3)Label1.Caption = ab = Int(Rnd * 3)Label2.Caption = bc = Int(Rnd * 3)Label3.Caption = cd = Int(Rnd * 3)Label4.Caption = d e = Int(Rnd * 3)Label5.Caption = ef = Int(Rnd * 3)Label6.Caption = fg = Int(Rnd * 3)Label7.Caption = gh = Int(Rnd * 3)Label8.Caption = hi = Int(Rnd * 3)Label9.Caption = i k = Int(Rnd * 3)Label10.Caption = kl = Int(Rnd * 3)Label11.Caption = li = Int(Rnd * 3)Label12.Caption = im = Int(Rnd * 3)Label13.Caption = mn = Int(Rnd * 3)Label14.Caption = n o = Int(Rnd * 3)Label15.Caption = oDim yaz As IntegerDim ff As StringDim say As Longyaz = FreeFileOpen "C: oto.txt" For Append As #yaz Write #yaz, a, b, c, d, e, f, g, h, k, l, m, n, oClose #yazEnd SubPrivate Sub Command2_Click() Dim buffer As String, hFile As Long hFile = FreeFile() Open "c: oto.txt" For Binary Access Read Lock Write As #hFile buffer = Space(LOF(hFile)) Get #hFile, , buffer Close #hFile Text1.Text = buffernewLabel.caption=""End Sub
Urgent - Counting Outlook Contact Items
Hi there... Long time reader, first time poster.
I'm creating an app using VB6 that interacts with the user's Outlook 2000 contact list. I have all of the coding done, but would like to be able to easily count how many Contacts are a part of a certain category (I.E. Suppliers). I am trying to do this without having to cycle through each contact and counting that way.
I have tried the command:
Dim myAddressEntries As AddressEntries
Set myAddressList = myNameSpace.AddressLists(1)
Set myAddressEntries = myAddressList.AddressEntries
lblEntryCount.Caption = myAddressEntries.Count
The myAdressEntries.Count command basically returns all of the contact items, regardless of category. I have not been able to find a way to get the command to only find items in the Suppliers category...
Any ideas welcome! I'm pulling my hair out here!
- Jibootie
Counting Distinct Number Of Items In A ListBox
Hello
I've populated a listBox with a load of country names. Each country can be included once, many times or not at all. I'm trying to work out how many distinct country names there are as wlel as counting how many times each country appears in the list. Here's an example of its contents:
Canada
Canada
USA
UK
France
UK
Canada
Italy
France
France
USA
USA
I aiming for the end result to be something like this
The original listbox contains this:
Canada
France
Italy
UK
USA
and another list box would hold the no. of times each Country appeared in the original list:
3
2
1
2
3
the numbers relate to the countries in alphabetical order.
I would use case statements or something like that if the list of countries was limited to a specific set however since the list can include any country it doesn't make much sense to do it this way.
So what other ways are there of doing this?
Thanks in advance!!
Counting Items In Listbox And Displaying Them (newbie)
Hello again
I've been trying to get this to work to no avail, and was hoping someone who actually knows what he or she is doing (ie not me) can look at..
What I'm trying to do is this... I have a hidden listbox of items.. I want to be able to go through each, split by ":" and look at the 2nd part of the array and tally up all the multiples in the rest of the list... and then in a 2nd listbox... list ONE instance of the item, with the total tabbed off to the side. It's a tally of how many "items" are needed, not who needs what.
So if the hidden Listbox has:
Joe:Beer
Jim:Beer
Bob:Beer
Bob:Oranges
The 2nd listbox would have
Beer3
Oranges1
But instead it has:
Beer1
Beer1
Beer1
oranges 1
I know this is something stupid/simple in my logic but I've been looking at it so long I can't figure it out... at this point my code is so bizarre from me trying things, well...
here's the offending bit of code:
Code:
For i = 0 To lstOrganize.ListCount - 1
theNameString = Split(lstOrganize.List(i), ":")
If lstOrganize.List(i) = "" Then
Else
For j = 0 To (i + 1) Step -1
theNameString2 = Split(lstOrganize.List(j), ":")
If theNameString (i) = theNameString2(i) Then
ItsThere = True
intTheCount = intTheCount + 1
Else
ItsThere = False
End If
Next j
If ItsThere = True Then
Call SendMessage(lstTotalNeeded.hWnd, LB_ADDSTRING, 0, ByVal theNameString(2) & vbTab & intTheCount)
Else
Call SendMessage(lstTotalNeeded.hWnd, LB_ADDSTRING, 0, ByVal theNameString(2) & vbTab & "1")
End If
End If
Next i
Any help that is provided is greatly appreciated.. it's driving me nuts
Character Counting, Line Counting And Saving RTB Files Without Formatting
Hi,
I quickly need to get a bit of help with the 3 things mentioned in the topic title:
Character Counting
When the RichTextBox is changed I want a label's caption to be changed so it counts all characters in the RTB. Not just words, I mean as in each and every letter, space, etc. I searched and search, and found nothing.
Line Counting
I also want, when the RTB is changed, for another label's caption is changed and now says how many lines are in the RTB. I tried doing this myself with getting the label's caption to be +1 for every time enter (vbCrLf) is clicked or used, but that didn't work and properly wouldn't do what I need it to do anyway.
Saving through a RTB without formatting
Basically, when you use the "SaveFile()" Protocol in a RTB it saves, yes, but it has formatting, like so:
Code:
{
tf1ansideff0{fonttbl{f0fnilfcharset0 MS Sans Serif;}}
viewkind4uc1pardlang1033f0fs17 [b]|<b>
par line 2
par line 2
par line3
par
par }
Which isn't what I want it to do, I just want it to save it like a normal text file, no formatting, just text, is there a way to override it's default action to do the above formatting?
Thanks in advanced.
Outlook 2000 Contact Items, Deleted Items And Address Books
Hi Folks,
Apologies if this is the wrong forum to open this thread (it may perhaps prove to be better located in the MAPI forum, but is not purely MAPI)
I'm developing a COM add-in for use with Outlook 2000 upwards and have hit a couple of stumbling blocks that I'd really appreciate some help on:-
1. As part of a sync process, some contact items are occasionally deleted from a user-defined custom contacts folder (the folder is never the default Outlook contacts folder). When these contacts are deleted, I would like to move them into the "Deleted Items" folder, rather than just kill them outright.
I use a simple little loop to identify the "Deleted Items" folder and store it as a MAPI folder reference in an object called: RecycleBin as follows:-
(Global Declarations)
Global oApp As Outlook.Application
Global ns As Outlook.NameSpace
Global ns_id_num As Integer
Global RecycleBin As Outlook.MAPIFolder
Global pfolder As Outlook.MAPIFolder
(Extract from routine: GetFolder - namespace correctly referenced previously in another routine)
dim f as integer
'
Set pfolder = ns.Folders(1) 'Personal Folders
For f = 1 To pfolder.Folders.Count
If Trim(UCase(pfolder.Folders(f))) = "DELETED ITEMS" Then
set RecycleBin = pfolder.Folders(f)
End If
Next f
'
However, in the sync routine (which appears to correctly access the RecycleBin object) when I use the .move method on the given contact, for some reason the contact is moved to the DRAFTS folder and not the "Deleted Items" folder.
I'm using Redemption for the ContactItem reference, but I dont think this is affecting things as I've tried the same thing with a regular Outlook.ContactItem object and I get the same result.
Is there something special I have to do to move contacts to the "Deleted Items" folder, or do I need to do something completely different? Alternatively, is there some parameter that can be parsed to the .delete method, which instructs Outlook to move the contact to the "Deleted Items" folder, rather than wipe it from the system?
2. I would like to make the user-defined custom folder an address book reference automatically. In Outlook 2002 there are the MapiFolder.ShowAsOutlookAB and MapiFolder.AddressBookName properties, which I'm sure will work fine, but what about Outlook 2000?
I know this value can be manually set, (by right-clicking the contact folder, selecting the "Properties" menu option, clicking the "Outlook Address Book" tab and putting a check-mark in the "Show as address book" check-box) but what I really need to do, is configure this automatically.
Any and all constructive help, suggestions and ideas gratefully received.
Thanks and Regards
Hitch
Saving Items (selected Items) In List Box To A Text File
I need help in coding the following:
1. Saving (or exporting) the items displayed in List Box to a text file.
2. I have a long list of data to be displayed. When I use this List box all of my data does not fit into the width. I was wondering if there is similar other way where I can do horizontal as well as vertical scrolling. I tried text box and its of no help i guess.
Get Items / Select Items From MSAccess Form Controls
Hello,
I am supposed to automation one application which is developed in MSAccess Form. None of the automation tools support AccessFormControls.
What i did was, i get into VB, tried to do that using Win32API.
i am able to active the window, and get the child windows. But there is one sub form in the form itself. And the controls are populatd on the form. And it will be dynamic.
I am not able to enumerate the controls in it.
Can anybody help me on this?
How To Derive Items From Items Automatically?
Hi all,
I have a table ITEM (Item_ID, Item_Name, Value), where Value is field that holds real numbers. I have the following business rule: An item is derived from one or more items. For instance, suppose I have the following items:
Item_ID````Item_Name````Value
1``````````X `````````` 10
2``````````Y ```````````20
3``````````Z ```````````5
According to the business rule, we may have the following: X = Y+Z. So, how can represent that in a database? Can i create a unary M:N relation, where an item derives/is derived by one or more items?
Thnx in advance.
Menu Bar Items Ands Sub Items In Vb
Hi,
Can we change the menu bar items fonts and sizes. if not in vb, any api calls can change it or any site thay I can read about. thanks for any help in advance.
Loop The Loop: Adding List Item And Sub-items Assigned To Items.
Hello there,
below are the codes i've written to record all the items (which are qnsID) in list box (List1) into qnsdata_table.
Code:
Private Sub Command6_Click()
Dim x As Integer
Dim y As Integer
x = List1.ListCount
y = 0
rst.Open "SELECT * from qnsdata_table", cn, adOpenDynamic, adLockOptimistic
Do While Not y = x
rst1.Open "SELECT qnsdataID from autonumber", cn, adOpenDynamic, adLockOptimistic
rst.AddNew
rst!qnsDataID = "qd" & Right("000000" & CStr(CInt(rst1!qnsDataID) + 1), 6)
rst!qnsID = Me.List1.ItemData(y)
rst.Update
rst1.Close
rst1.Open "UPDATE autonumber SET qnsdataID = qnsdataID +1", cn, adOpenDynamic, adLockOptimistic
y = y + 1
Loop
rst.Close
End Sub
The problem is that for each item (qnsID) there are several assigned (ansID) and i need them to be recorded along with the qnsID, into qnsdata_table.
______________________________
| qnsdataID | qnsID | ansID |
-----------------------------------
| qd0001 | qns0002 | ans0012 |
| qd0002 | qns0002 | ans0016 |
| qd0003 | qns0002 | ans0001 |
------------------------------------
In this case, should i have another Do While Loop within the current Loop, to find out how many 'ansID' there are which are assigned to each 'qnsID'.
I've tried
Code:
rst2.Open "SELECT Count(ansID) AS ansID_count FROM ans_table where....(conditions)
Me.Text2 = rst2!ansID_count '(ive no idea where to store the count) value)
a = Me.Text2 '(shift value into variable a)
b = 0
and here goes another loop, but it didn't work.
Need some advice and comments from you guys =)
Thanks a million.
Astrov
Add More Items To A Listbox And Keep The Old Items
I have a value in a listbox. But I wanna add more items into the listbox and keep the old items. The new items should be added to the right side of the old values on the same row separated with VbTab.
Counting
I am working in MS Access, I currently am using an input box to set place and set the defalut value in a form. I want to have the inputbox ask for a beginning number, place that number in a field and then automatically fill the rest of the fields with the following number. Ex. field 1, show the number 1, then field 2, show the number 2, then field 3 show the number 3, etc. Basically place the next number in the next field. I can get the form to ask for the number, but don't know how to do the automatic count.
Counting
Excuse me how can i make a counting numbers ... i mean i have a one label and when i run it i must saw a running numbers in the label .... 1 to 100 ....
example:
this is the label
[ ] <---- label when i run the program i must see a running number 1 to 100
this is like a loading section
Counting Help!
Hey, its a pretty newbie question I suppose just and stumped, becuase I havent used VB6 in a while. I'm tng to get my program to count +1 everytime it reaches a part in a function, heres my code.
Code:
count = 0
count = count + 1
Text1.text = count
everytime it reaches this part it just stays at 1.
Counting
sorry to bother one and all again by displaying my lack of ability in vb but was hoping that the kind souls who have helped me again could provide the service once again.
I have a setup that looks like this (more or less):
X1 X2
Y1 Y2
GO!
The X and Y's represent butons as does the GO!. What i'm hoping (yet dismally failing) to achieve is that when a single X or Y is visible it has a value of 1 and 0 when it is not visible. Cicking on a X or Y makes it not visible. The notion being that I could have a formula say 'If X1+X2 = Y1 + Y2 then' eg total up the number of X's visible and Y's possible and make a comparrison between the total numbers. This statement would be activated by clicking the GO! button.
I think that makes sense - i've been playing with Const to no avail, but at any point in my life will happily admit to being a muppet so this may be not seeing the wood for the trees.
thanks for any help
kev
Counting And Going Through
Hi,how would i select a file using the CommonDialog control then count the words in the file, then use a timer to run through the txt file to find a matching word?? a example would be a put a name in a text box and click a button to add it to a list, click on the name in the list then click the go button and have it count how many words are in the text box and run through the txt file until it finds a match...
Counting
Hey... had a little problem here.
I have some strings which contain numbers of all different lengths. For example, one might be 15, and another might be 132195.
I pretty much need to make every number 10 digits long, by adding zeros to the beginning of the numbers. My problem is... how can I make VB count the number of characters in the string, so I know how many zeros to add?
Thanks!
Counting Down!
Hi Guys,
I was hoping that somebody could tell me how I could set my timer to count backwards, like 5,4,3,2,1.
Its for a game and I want to display the remaining time the player has got.
Hope to hear from someone soon :-)
cheryl
Counting
Private Sub GetRecordCount()
Dim strSQL As String
strSQL = "Select COUNT(*) from Request"
With datRequest2
.RecordSource = strSQL
End With
End Sub
I am trying to get the count of all the records in a table and display it on the form when the form load.
I have called the above method when the form loads.
However I cant get the actual number,that is the number of records in the table, to display in the text box. How do I do that?
Signing Off
Sir Stupidhead!!
Counting
Hi ! i need help with my code something is wrong as u can see :P
Code:
Private Sub Timer1_Timer()
Dim Attk
Attk = Text2 + 1
Text2.Text = Attk + 1
Text2 = Text2
End Sub
Please help
Counting
I have combo1.text with value 1. I want to save three time only. I don't want the messagebox asking me when the count reach 3. How to do that?
Code:
MsgBox "Records Save",vbInformation, "Info"
If MsgBox("You Want to add record : "& Combo1.text & " ?",vbQuestion + vbYesNo) = vbYes Then
Counting Help!
Ok, I've written a program in which you have to log in to initially start the actual form but I don't people to give away their username and password so I made the login form check a web site in which it will say Username: Yes or Username: No. So, if it says Username: No it tells the user that they cannot log in. So yes, I can disable an account at any time but I need to count how many times people have logged in. The one thing I tried was to put a website counter on the website where it says Username: Yes or Username: No but it isn't actually counting when the user is accessing the website through the program. By the way I'm using Inet to access the source on the website. Are there any other ideas on how I can count how many times a user has logged on and have it recorded on the internet so I don't have to check their program for the counter?
I'm flexible, any means will be tested.
PS - Using VB6
Pls Help About Counting...
i need a help here, what will be the codes for counting lines and columns of rich text box in visual basic? how can the columns be counted? numbers in line and column were increasing if i type something on the richtextbox... plz help.. tnx to all!!
Counting In ABC's...
what i am trying to do is make a program that counts in abc's
For example:
the numbers would be
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 exc...
the ACB's would be
a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bc bb exc...
if you notice the numbers when the lastnumber gets to 9 they revert to 0 with the number in front of them + 1
what i want to do is the exact same thing as the numbers but with the ABC's...
(when the last letter gets to z the letter infront of it is the same + 1 {letter after it} )
Do you see where i am going?
this is very hard to explain
and another thing i want the letters to go on for ever if possible
Thank You
Counting....
If I want to Count the number of times something occurs in a Table how do I do that...
I could do with the Recordcount property to get a total figure. For example
If a following table exists:
A
A
A
A
B
B
C
D
D
How do I know how many times does A exists and so on....
Counting
This is to load a file into List1
VB Code:
On Error GoTo 1 With CD1 .DialogTitle = "Open File" .Filter = "All Supported Types|*.usr;*.txt;*.dat|" .ShowOpenDim sText As String Dim x As Integer x = FreeFile On Error Resume Next Open .FileName For Input As #x While Not EOF(x) Input #x, sText$ If sText$ = "" Then Exit Sub Else List1.AddItem sText$ DoEvents End If Wend Close #x End With Exit Sub1Exit Sub
Where in that exact code would I put Label1.Caption = "# Of Words:" & List1.ListCount so it counts them after there laoded?Thx guys
Counting
have a userform with a combo box and three textboxes. The user will select a set of initials from
the combobox (ex. "RF"). Then it use those intitials to determine the value of the textboxes. The three
textboxes will represent the follwing data 1st="SA", 2nd="SP", 3rd="RS". So for the first textbox it
will use the intials RF. It will find those intials on my excel worksheet. Then on that row it will
read the data on column a, which should be either SA,SP,RS. So then it will display how many SAin textbox1,
SP in textbox2, and RS in textbox3 belong to the initals RF. I only need to following worksheets evaluated
data1, data2, data3, data4. Thank you for any help you can give me.
Counting - In VB
hi buddies,
how do i count the number of times a button is clicked? is it possible to display images on the form each time the button is clicked, like when i click the first time i get the picture 1 displayed and during the second click picture 2 is also displayed etc...
cheers!
Dinesh Manoharan.
Counting
Hi Everyone,
How can I count a column of cells in Excel to determine how many have values in them and how many do not? Thanks for any help. Here is what I have tried.
Code:
Dim intCountCells As integer
intCountCells = xlApp.Cells(lngRow + 7, 2).Count
I want to count from row (8, 2) to (8, 38),
Counting Down
How do i make a timer control to perform a count down task. For example i want a label to, starting frrom 30, count down to 0 . how do i do that??? and also, how come when i set the timer interval to something large and press enter, the timer control disappear on the form and i can only access its properties and can't delete it ???
pls help
thank you!
Counting
Hi Everyone,
Is there a counting feature in MSAccess? I need to find out how many records there are for each member in a database table. Not, how many records there are all together. Any help would be appreciated. Thank you.
Need Help Counting
Ok say I have a string of like 1000 characters, and I want to find say "Hello" in that string, and after I have found it I want to find out how many characters it was away from the end of the string.
How do i do that??
Any takers.
To make it eaiser the string can be in a text file. Infact I would prefer if it was in a file.
I thought that you could use like binary or something to find the Hello in a text file but then I am not sure how to find out how far to the end of the file.
Code:
File = "Path to file and file name"
Open File for Binary as #1
............
And I am not sure what to do from there
Please help me out
Thanks
-|- Hurgh -|-
Counting Down
I am trying to design a program which will launch another program, and perform a countdown while it is running. I have it all set up in timers, and the counting down works great by itself, but when the other program is launched, it constantly tries to start the program on every second. I believe the "evil" timers are messing me up. Is there a better way to perform this counting function not using timers? I just want to disable the timers when the time calls for the other program to run, but continue to countdown how much time in minutes and seconds. Is the Gettickcount the best option and then can I perform a datediff? Just a little lost, and needing some assistance. Thanks to evryone for your help so far.
Counting
I have a File list box that I move files between directories with. Each file has a different number of files which are associated with it, they are designated by a letter such as:
1001234A & 1001234B
1004321A & 1004321B & 1004321C etc...
I would like to be able to count the files in this file list box, but I only need to count the file names with an A in the name.
Is this possible?
thanks
JO
Counting Down, How?
i got a value as for example 01:34:32 (hh:mm:ss). Wich is the best and easiest way to count down this to 00:00:00,
and then put my code. i want to display the time in a label.
Counting
I have a problem with countig (VB3):
The caption of Label1 is '3'
The caption of Label2 is '6'
I want to add up the two numbers, but VB always
wirtes 36 instead of 9 with this method:
Label3.caption = Label1.caption + Label2.caption
I want that the two numbers are added and I don't
want to use a text-box.
Thanks for some advice, Matt-D(eutschland)
Counting
Is it possible to count with nubers who have nulls ?
Like 001, 002, 003, 004
With this code there are no zeros:
Text1.text = Text1.text + 1
(1, 2, 3...)
Thanks for some help, Matt
Counting
how to do this in vb
example
input = sample
output
How many letter are there : 6
.... i want that any i inputed in it must be count how many letters are there
Counting In Vb
i have created a sort of petrol pump simulation lol
which simulates 7 segment LCD screen and the numbers that are displayed on LCD screen are also displayed in txt boxes (so customers can see the LCD screen and the owner is able to see amount of petrol dispensed on his console in his office)
the number is in the xx.x format, now i wonder how can i get the last digit to go up in fives, in other words to count up in fives, but last digit only
any ideas
Need Help Counting!
Ok, I've written a program in which you have to log in to initially start the actual form but I don't people to give away their username and password so I made the login form check a web site in which it will say Username: Yes or Username: No. So, if it says Username: No it tells the user that they cannot log in. So yes, I can disable an account at any time but I need to count how many times people have logged in. The one thing I tried was to put a website counter on the website where it says Username: Yes or Username: No but it isn't actually counting when the user is accessing the website through the program. By the way I'm using Inet to access the source on the website. Are there any other ideas on how I can count how many times a user has logged on and have it recorded on the internet so I don't have to check their program for the counter?
I'm very flexible on this problem and all suggestions will be tested to see if they will work.
ITS FUN WITH COUNTING... YAY
I need to go through a database filled with info on books and count all the different types of books and then put the totals for each type into integer variables using the code that i provided below.. i think im on the right track but im missing a bit and im kinda stuck... i need to get this project done or im in big ole cacka if you could possibly fill in the blanks for me and help me out with what im missing thatd be mint.. thanks
Code: strSQL = "SELECT * FROM Books WHERE Out = True"
Set rsType = MuniRecordSet(strSQL)
Do While Not rsType.EOF
If Me.Tag = rsType.Fields!Type Then
Select Case "tag":
Case "O":
nO = nO + 1
Case "J":
nJ = nJ + 1
Case "OA":
nOA = nOA + 1
Case "VB":
nVB = nVB + 1
Case "ALL":
nALL = nALL + 1
End Select
End If
rsType.MoveNext
Loop
Counting Down?
I am using the following counter to count down from 60 to 0 :
Private Sub Timer1_Timer()
Static Counter As Integer
Counter = Counter - 1
If Counter <= 0 Then
Counter = 60
End If
End Sub
However it stops at 59.
Any help would be appreciated
Thanks
|