A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vba



 
 
Thread Tools Display Modes
  #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
  #2  
Old June 1st, 2010, 08:46 PM posted to microsoft.public.access
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default vba

Sherry

Based on your code, I'm guessing you're working in Excel. This newsgroup
supports MS Access, the relational database.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Sherry" wrote in message
...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.