Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Selecting a range relative to ActiveCell, copy it to second Workshett within Workbook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Monta Zengerle - 31 Jul 2006 03:12 GMT
This works through "ActiveCell.Offset(0, -8).Activate" but then doesn't.

Any help appreciated.

Sub SortforMember()
   
   Worksheets("Sheet1").Activate
   Worksheets("Sheet1").Range("I1").Select
   Worksheets("Sheet2").Activate
   Worksheets("Sheet2").Range("a2").Select

Do Until Cell = "Null"
     
  Sheet1.Activate
  ActiveCell.Offset(1, 0).Activate
 
    If ActiveCell = "Yes" Then
 
   
     ActiveCell.Offset(0, -8).Activate
    Range(Cells(1, 1), End(x1ToRight)).Copy _
   destination:=Worksheets("Sheet2").Range(Cells(0, 0), Cells(0, 9))
       
   
     
       Sheet2.Activate
       ActiveCell.Offset(1, 0).Activate
       
    End If
       
    If ActiveCell = "No" Then
       Sheet2.Activate
       ActiveCell.Offset(0, 0).Activate
  End If
       
       
  Loop

End Sub
Dave Peterson - 31 Jul 2006 12:29 GMT
x1ToRight is xltoright (you have a 1 (one) instead of an L (ell).

But you have some other problems, too.

You may want to describe what you're doing.  There are better ways than
depending on .selects and .activates and the activecell.

> This works through "ActiveCell.Offset(0, -8).Activate" but then doesn't.
>
[quoted text clipped - 31 lines]
>
> End Sub

Signature

Dave Peterson


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.