troubleshooting Question

# Count the times of a text of a .txt file. 'Visual Basic v6.0 and 500 points'

Visual Basic Classic
Hi experts, i need to count how many times the word "S e a t =" exist on my .txt file and bring the results back to my visual basic project. On the above .txt file the word  "S e a t =" exist a lot of times however, i want to get only the unique S e a t s = X .

If the file contains this..

Example #1
" S e a t = 1"      ' Count 1
" S e a t = 2"      ' Count 1
" S e a t = 3"      ' Count 1
" S e a t = 4"      ' Count 1
" S e a t = 5"      ' Count 1
" S e a t = 6"      ' Count 1
" S e a t = 7"      ' Count 1
" S e a t = 8"      ' Count 1
" S e a t = 9"      ' Count 1

Then i should get a msgbox "I Count 9 S e a t s"

Example #2:

" S e a t = 6"      ' Count 1
" S e a t = 7"      ' Count 1
" S e a t = 7"      ' Count 1
" S e a t = 6"      ' Count 1
" S e a t = 8"      ' Count 1
" S e a t = 9"      ' Count 1

On this example i should get a msgbox like  " I count 4 s e a t s"

Now on the above .txt  i see..

S e a t = 4
S e a t = 5
S e a t = 7
S e a t = 3
S e a t = 4
S e a t = 5
S e a t = 4

So here we have to count only the 4,5,7 and 3

Msgbox "I count 4 seats"

How can i do that ? i appriciated any comments
Thanks
``````This is the .txt file..

 ý  ý                                                                                                                                                                                                                                                   µ`!ö¼ÜH	 EéYq-12 0 0 8 0 8 1 0 0 5 1 1 3 1 < G a m e   i d = " 2 1 2 7 5 0 7 0 1 6 "   d a t e = " 2 0 0 8 - 0 8 - 0 9   2 2 : 1 1 : 3 1 "   u n i c o d e t a b l e n a m e = " S w B h A H Q A Y Q B y A G k A b g B h A C A A V w B p A G 4 A c w B s A G 8 A d w A = "   t a b l e n a m e = " K a t a r i n a   W i n s l o w "   s t a k e s = " 2 5 . 0 0 | 5 0 . 0 0 "   b e t l i m i t = " N L "   t a b l e t y p e = " C a s h   G a m e "   g a m e t y p e i d = " 1 "   g a m e t y p e = " H o l d   & a p o s ; e m "   r e a l m o n e y = " f a l s e "   c u r r e n c y s y m b o l = " "   r a k e = " 0 "   p l a y e r s e a t = " 5 "   b e t a m o u n t = " 5 0 0 0 0 "   i s t o u r n a m e n t = " 0 " >
< S e a t s >
< S e a t   n u m       = " 3 "   a l i a s = " C h i l l y d a w g 1 "   u n i c o d e a l i a s = " Q w B o A G k A b A B s A H k A Z A B h A H c A Z w A x A A = = "   b a l a n c e = " 1 7 6 5 0 . 0 0 "   e n d b a l a n c e = " 1 7 1 5 0 . 0 0 "   d e a l e r = " t r u e " / >
< S e a t   n u m = " 4 "   a l i a s = " W e n n w o o d "   u n i c o d e a l i a s = " V w B l A G 4 A b g B 3 A G 8 A b w B k A A = = "   b a l a n c e = " 1 5 7 8 7 . 5 0 "   e n d b a l a n c e = " 1 5 6 6 2 . 5 0 " / >
< S e a t   n u m = " 5 "   a l i a s = " I a m H e r e 0 0 1 "   u n i c o d e a l i a s = " S Q B h A G 0 A S A B l A H I A Z Q A w A D A A M Q A = "   b a l a n c e = " 4 5 0 . 0 0 "   e n d b a l a n c e = " 1 3 0 0 . 0 0 " / >
< S e a t   n u m = " 7 "   a l i a s = " b e n f i c a 1 9 6 2 2 "   u n i c o d e a l i a s = " Y g B l A G 4 A Z g B p A G M A Y Q A x A D k A N g A y A D I A "   b a l a n c e = " 2 4 5 0 . 0 0 "   e n d b a l a n c e = " 2 3 0 0 . 0 0 " / >
< / S e    a t s >
< G a m e p l a y >
< A c t i o n   s e q = " 1 "   t y p e = " S m a l l B l i n d "   s e a t = " 4 "   v a l u e = " 2 5 . 0 0 " / >
< A c t i o n   s e q = " 2 "   t y p e = " B i g B l i n d "   s e a t = " 5 "   v a l u e = " 5 0 . 0 0 " / >
< A c t i o n   s e q = " 3 "   t y p e = " D e a l C a r d s "   s e a t = " 5 " >
< C a r d   v a l u e = " K "   s u i t = " d "   i d = " 3 8 " / >
< C a r d   v a l u e = " J "   s u i t = " c "   i d = " 2 3 " / >
< / A c t i o n >
< A c t i o n   s e q = " 4 "   t y p e = " C a l l "   s e a t = " 7 "   v a l u e = " 5 0 . 0 0 " / >
< A c t i o n   s e q = " 5 "   t y p e = " C a l l "   s e a t = " 3 "   v a l u e = " 5 0 . 0 0 " / >
< A c t i o n   s e q = " 6 "   t y p e = " C a l l "   s e a t = " 4 "   v a l u e = " 5 0 . 0 0 " / >
< A c t i o n   s e q = " 7 "   t y p e = " B e t "      s e a t = " 5 "   v a l u e = " 1 5 0 . 0 0 " / >
< A c t i o n   s e q = " 8 "   t y p e = " C h a t "   s e a t = " 4 "   v a l u e = " g l a d   u a r e h e r e " / >
< A c t i o n   s e q = " 9 "   t y p e = " C a l l "   s e a t = " 7 "   v a l u e = " 1 5 0 . 0 0 " / >
< A c t i o n   s e q = " 1 0 "   t y p e = " C a l l "   s e a t = " 3 "   v a l u e = " 1 5 0 . 0 0 " / >
< A c t i o n   s e q = " 1 1 "   t y p e = " C h a t "   s e a t = " 4 "   v a l u e = " l o l " / >
< A c t i o n   s e q = " 1 2 "   t y p e = " C a l l "   s e a t = " 4 "   v a l u e = " 1 5 0 . 0 0 " / >
< A c t i o n   s e q = " 1 3 "   t y p e = " D e a l F l o p " >
< C a r d   v a l u e = " 3 "   s u i t = " h "   i d = " 4 1 " / >
< C a r d   v a l u e = " J "   s u i t = " d "   i d = " 3 6 " / >
< C a r d   v a l u e = " Q "   s u i t = " c "   i d = " 2 4 " / >
  < / A c t i o n >
< A c t i o n   s e q = " 1 4 "   t y p e = " C h e c k "   s e a t = " 4 " / >
< A c t i o n   s e q = " 1 5 "   t y p e = " C h e c k "   s e a t = " 5 " / >
< A c t i o n   s e q = " 1 6 "   t y p e = " C h a t "   s e a t = " 3 "   v a l u e = " s t i l l   f u n n y   " / >
< A c t i o n   s e q = " 1 7 "   t y p e = " C h e c k "   s e a t = " 7 " / >
< A c t i o n   s e q = " 1 8 "   t y p e = " C h e c k "   s e a t = " 3 " / >
< A c t i o n   s e q = " 1 9 "   t y p e = " D e a l T u r n " >
< C a r d   v a l u e = " J "   s u i t = " s "   i d = " 1 0 " / >
< / A c t i o n >
< A c t i o n   s e q = " 2 0 "   t y p e = " C h e c k "   s e a t = " 4 " / >
< A c t i o n   s e q = " 2 1 "   t y p e = " C h e c k "   s e a t = " 5 " / >
< A c t i o n   s e q = " 2 2 "   t y p e = " C h a t "   s e a t = " 7 "   v a l u e =    " a l w a y s   f u n n y " / >
< A c t i o n   s e q = " 2 3 "   t y p e = " C h e c k "   s e a t = " 7 " / >
< A c t i o n   s e q = " 2 4 "   t y p e = " C h e c k "   s e a t = " 3 " / >
< A c t i o n   s e q = " 2 5 "   t y p e = " D e a l R i v e r " >
< C a r d   v a l u e = " 5 "   s u i t = " c "   i d = " 1 7 " / >
< / A c t i o n >
< A c t i o n   s e q = " 2 6 "   t y p e = " C h e c k "   s e a t = " 4 " / >
< A c t i o n   s e q = " 2 7 "   t y p e = " A l l I n "   s e a t = " 5 "   v a l u e = " 3 5 0 . 0 0 " / >
< A c t i o n   s e q = " 2 8 "   t y p e = " C h a t "   s e a t = " 4 "   v a l u e = " l o l " / >
< A c t i o n   s e q = " 2 9 "   t y p e = " F o l d "   s e a t = " 7 " / >
< A c t i o n   s e q = " 3 0 "   t y p e = " C a l l "   s e a t = " 3 "   v a l u e = " 3 5 0 . 0 0 " / >
< A c t i o n   s e q = " 3 1 "   t     y p e = " F o l d "   s e a t = " 4 " / >
< A c t i o n   s e q = " 3 2 "   t y p e = " S h o w C a r d s "   s e a t = " 5 " >
< C a r d   v a l u e = " K "   s u i t = " d "   i d = " 3 8 " / >
< C a r d   v a l u e = " J "   s u i t = " c "   i d = " 2 3 " / >
< / A c t i o n >
< A c t i o n   s e q = " 3 3 "   t y p e = " M u c k C a r d s "   s e a t = " 3 " >
< C a r d   v a l u e = " 8 "   s u i t = " d "   i d = " 3 3 " / >
< C a r d   v a l u e = " A "   s u i t = " c "   i d = " 1 3 " / >
< / A c t i o n >
< A c t i o n   t y p e = " W i n " >
< S e a t   n u m = " 5 "   a m o u n t = " 1 3 0 0 . 0 0 "   p o t = " 0 "   t y p e = " "   l o w h a n d w i n = " 0 " / >
< / A c t i o n >
< / G a m e p l a y >
< / G a m e >
``````
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
###### Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.