By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,813 Members | 2,269 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,813 IT Pros & Developers. It's quick & easy.

moody DirectSS1

P: 25
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?

Expand|Select|Wrap|Line Numbers
  1. Private Sub Commd4_Click()
  3.     DirectSS1.Speak Lbltext1.Caption
  5.     If Lbltext2.Visible = True Then
  6.     DirectSS1.Speak Lbltext2.Caption
  7.     Else: End If
  9.     If Lbltext4.Visible = True Then
  10.     DirectSS1.Speak Lbltext4.Caption
  11.     Else: End If
  14. End Sub
Any help would be appreciated.

Jul 3 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 8,127
if the same code is working on other machines ,how the code be wrong.
Jul 4 '08 #2

P: 25
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.
Jul 4 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.