Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

moody DirectSS1

Question posted by: mustakbal (Newbie) on July 3rd, 2008 06:49 PM
I have an unusual problem where the following code works fine on many winxp machines while it doesn't on some others. The Directss1 is supposed to read first Lbltext1, then read Lbltext2 (if not hidden) and finally Lbltext4 -- again if not hidden. As I said it works fine on most machines but on others it reads only the last label in the sequence. In other words if all labels are showing and not hidden, it will only read Lbltext4. But if that label is hidden it will only read Lbltext2 and when that is hidden it will read Lbltext1. It does not read all of them in turn. I wonder if the problem is in the code or the machines?


Code: ( text )
  1. Private Sub Commd4_Click()
  2.  
  3.     DirectSS1.Speak Lbltext1.Caption
  4.    
  5.     If Lbltext2.Visible = True Then
  6.     DirectSS1.Speak Lbltext2.Caption
  7.     Else: End If
  8.    
  9.     If Lbltext4.Visible = True Then
  10.     DirectSS1.Speak Lbltext4.Caption
  11.     Else: End If
  12.  
  13.  
  14. End Sub


Any help would be appreciated.


Mustakbal
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
debasisdas's Avatar
debasisdas
Moderator
6,439 Posts
July 4th, 2008
04:21 AM
#2

Re: moody DirectSS1
if the same code is working on other machines ,how the code be wrong.

Reply
mustakbal's Avatar
mustakbal
Newbie
18 Posts
July 4th, 2008
06:00 AM
#3

Re: moody DirectSS1
I was inclined to think that it wasn't the code but when it happened on more than one machine I thought it best that someone with more knowledge look at the code and see if I overlooked something. It's likely that this problem is related to winxp with a specific service pack. Anyways, is it possible to have the code "force" the execution of reading the first label before it moves to the next label and check if it has to read it.
I'm looking to have the code work properly even on those machines.

Reply
Reply
Not the answer you were looking for? Post your question . . .
180,794 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Top Visual Basic Forum Contributors