+ Reply to Thread
Results 1 to 2 of 2

creating an offset based on a range variable

  1. #1
    Forum Contributor
    Join Date
    09-05-2019
    Location
    Vancouver, Canada
    MS-Off Ver
    Office 365
    Posts
    101

    creating an offset based on a range variable

    Hello, I created a range variable for later use, so I can take advantage of the inbuilt .OFFSET function. However, after utilizing the

    However, it keeps getting stuck in the line 'Sheets("Temp").pasteRange.Offset(, 1).Formula = 2". The error "Object doesn't support this property or method." How would I go about fixing it to make it work as intended?

    Please Login or Register  to view this content.
    Thank you for your help
    Last edited by dcwan; 04-08-2020 at 06:02 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: creating an offset based on a range variable

    Qualify the Sheet when you set the range variable. Not when you use it. The Sheet is part of the range variable. If you do not qualify a sheet when you set the range variable, it defaults to the sheet that was active when you set it.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to extract a piece of a string variable, and assign to a new variable
    By jmccoughlin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-04-2015, 11:50 PM
  2. Replies: 3
    Last Post: 02-17-2015, 11:53 PM
  3. [SOLVED] Sorting a range based on string variable
    By AidenS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2014, 10:25 PM
  4. [SOLVED] creating a variable range in VBA to be copied to variable sheets
    By adamNBU in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-29-2013, 06:20 PM
  5. Replies: 4
    Last Post: 07-12-2013, 12:14 PM
  6. Transferring a dynamically named string variable to another string variable.
    By Concorde Rules in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2012, 04:08 AM
  7. Concatentate string & variable to equal another variable
    By NTB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2011, 04:55 PM

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