+ Reply to Thread
Results 1 to 1 of 1

Thread: Copy Paste Group Hide

  1. #1
    Registered User
    Join Date
    02-06-2011
    Location
    New York, America
    MS-Off Ver
    Excel 2003
    Posts
    3

    Copy Paste Group Hide

    hello all,

    If there is a earlier post on this topic, please refer me to it.

    I am writing a VBA macro to copy a selection,

    paste it into a different workbook,

    then group the newly pasted data,

    then hide the data.

    Since I am using the mouse to select the cell to insert above each time, it selects only one cell.

    I cannot automate the grouping procedure because it groups only one row, the row with the single cell selected.

    Anyone have a problem like this before?

    The Code is below:
    Public Sub CopyContacts()
    '
    ' Macro2 Macro
    ' Macro recorded 2/4/2011 by ********
    '
    
        Dim FinalRow As Integer
        FinalRow = Range("A65536").End(xlUp).Row
    
        Rows("3:" & FinalRow).Copy
            
        
        
    
    End Sub
    
    Public Sub PasteContactstoCalllist()
    '
    ' Macro1 Macro
    ' Macro recorded 2/4/2011 by********
    
     
    
    
        
        
        
            Selection.Insert Shift:=xlDown
            Selection.Rows.Group
        
         
        
        
        Application.CutCopyMode = False
        
        ActiveSheet.Outline.ShowLevels RowLevels:=1
        
        
    End Sub
    Last edited by Leith Ross; 02-07-2011 at 04:40 PM. Reason: Added Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0