Thread: vba
View Single Post
  #1  
Old June 1st, 2010, 07:39 PM posted to microsoft.public.access
Sherry
external usenet poster
 
Posts: 225
Default vba

I have a message that pops up saying debug, then I double click and receive
this
can anybody help me with this. I want to just pull all by george onto
another spreadsheet call call Jon and the info is pulling from master name
Grace.

Private Sub Worksheet_Activate()
Call Sheet5.getvalues
Call Sheet5.SortRange1
End Sub
Sub getvalues()
lr = Application.Max(2, Cells(Rows.Count, 1).End(xlUp).Row)
'MsgBox lr
Rows("2:" & lr).ClearContents
With Worksheets("Grace")
slr = .Cells(Rows.Count, "a").End(xlUp).Row
'MsgBox slr
For L = 2 To slr
dlr = Cells(Rows.Count, "a").End(xlUp).Row + 1
' If .Cells(L, "L") = GEORGEL and not .cells(f, "F") = "Closed" Then
..Rows(f).Copy Rows(dlr)
If .Cells(L, "l") = GEORGE Then .Rows(F).Copy Rows(dlr)
Next L
End With
End Sub
Sub SortRange1()
--
Sherry