View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Problem running code in proper order

This line confuses me:

Call FindLastNoXXX.FindLastNoXXX

Maybe:

Call FindLastNoXXX



"Patrick C. Simonds" wrote in message
...
My problem is that the code:

Call FindLastNoXXX.FindLastNoXXX

does not seem to complete before the UserForm displays. The FindLastNoXXX
code needs to place a value in Cell AA5 prior to the UserForm opening. Any
ideas?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

Dim rng
Set rng = Cells(ActiveCell.Row, 1)

If rng(1, 2).Value = "" Then
Application.EnableEvents = False
GoTo Finished

End If

If Not Application.Intersect(Target, Range("C7:V700")) Is Nothing Then
'NoShowDataInput.Show

Call FindLastNoXXX.FindLastNoXXX

NoShowDataInput.Show

End If

Finished:

End Sub