• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Code runs in development application , but not in production application

Frncis

Member
I have code that advises user what action to take, when they enter "VR" in cell range N3:N329. Here is the development code:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

' The user is notified to take appropriate action, when VR is entered in column N.

    Set KeyCells = Range("N3:N329")



If Not Application.Intersect(KeyCells, Range(Target.Address)) _

           Is Nothing Then

          

   Application.Speech.Speak "Click. Vocational Asstistance. Update Button. and verify that the name was entered. If it was entered. Click yes. for the appropriate service.", SpeakAsync:=True

         Application.Wait (Now + TimeValue("00:00:2"))

   VBA.MsgBox "Click Voc Asst Update Button, & verify that name was entered. If entered, Click yes for the appropriate service.", vbOKOnly + vbInformation, _

                       "Vocational Services Reminder"

    Exit Sub

   End If
End Sub
Here is the production code:
Code:
' The user is notified to take appropriate action, when VR is entered in column N.
    Set KeyCells = Range("N3:N329")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then
          
   Application.Speech.Speak "Click. Vocational Asstistance. Update Button. and verify that the name was entered. If it was entered. Click yes. for the appropriate service.", SpeakAsync:=True
         Application.Wait (Now + TimeValue("00:00:2"))
   VBA.MsgBox "Click Voc Asst Update Button, & verify that name was entered. If entered, Click yes for the appropriate service.", vbOKOnly + vbInformation, _
                       "Vocational Services Reminder"
    Exit Sub
   End If
Here is the production code:
Code:
' The user is notified to take appropriate action, when VR is entered in column N.
    Set KeyCells = Range("N3:N329")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then
          
   Application.Speech.Speak "Click. Vocational Asstistance. Update Button. and verify that the name was entered. If it was entered. Click yes. for the appropriate service.", SpeakAsync:=True
         Application.Wait (Now + TimeValue("00:00:2"))
   VBA.MsgBox "Click Voc Asst Update Button, & verify that name was entered. If entered, Click yes for the appropriate service.", vbOKOnly + vbInformation, _
                       "Vocational Services Reminder"
    Exit Sub
   End If

Unless I am missing something they are identical. Does anyone know what could cause the problem & how to fix it.
'
 
Problem solved. It was one of those times that technology was acting stupid. I walked away & worked on another project.
 
Back
Top