Results 1 to 8 of 8

Help with Copying Ranges and Offsets

Threaded View

  1. #1
    Registered User
    Join Date
    09-27-2007
    Posts
    10

    Help with Copying Ranges and Offsets

    I have a spreadsheet where I want to copy data from one sheet to another. The range to be copied is dependent on a few variables. It will always be 55 rows long and 'j' columns wide. Variable j represents the variable that will change every time this macro is run. I'm having issues when I try to activate the range to be copied. I get an application error or a with block error depending on whether the with block is int he code. I saw this on another website which had me insert the with block: http://stackoverflow.com/questions/1...d-error-in-vba
    It's been a while since I've coded and I am very rusty. Anyways, here is my code below. I feel like if I can get past this copying the range part and understanding my errors using offset, I can easily finish up what I want it to do - which is why my code will appear to be useless (I haven't finished the rest of it yet). So thanks in advance!

    Sub CopyStuff()
    
    Dim noProp, noStreams, countInt As Integer
    Dim pasteRng As Range
    
    Worksheets("Summary").Activate
    
    noProp = Range("B1")
    noStreams = Range("B2")
    
    With Worksheets("Output")
    
    Range("E5").Activate
    
    pasteRng = Range(ActiveCell, ActiveCell.Offset(55, noStreams - 1))
    
    End With
    
    End Sub
    Last edited by lfwake2wake; 03-25-2013 at 02:00 PM.

Thread Information

Users Browsing this Thread

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

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.6.0 RC 1