+ Reply to Thread
Results 1 to 4 of 4

Generic Range Object

  1. #1
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Generic Range Object

    Hi

    Still learning and needed help on using xlLastRow when using the Range object.

    I am looping through some code to print some pdf files. Instead of fixing the Range to print out I would like the "A1:Z40" range to be generic as the range can change. Can anyone help?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: Generic Range Object

    Generic in what way? How should the code determine what to export?
    Rory

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

    Re: Generic Range Object

    How do you want to define the "generic" range?

    This will define the used range on worksheet "Main" if that's what you want.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 11-20-2019 at 08:31 AM.
    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.

  4. #4
    Forum Contributor
    Join Date
    04-19-2010
    Location
    Manchester
    MS-Off Ver
    Excel 2007
    Posts
    180

    Re: Generic Range Object

    Hi
    Thanks for the replies and sorry for not being clearer.

    Please Login or Register  to view this content.
    did the trick - thank you !

+ 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] Method 'Range' of object '_Global' failed when trying to apply a dynamic range to sheets
    By belsher in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-19-2019, 09:37 AM
  2. Form range error: Method 'Range" of object '_Global'
    By eadamy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2015, 10:06 AM
  3. [SOLVED] How to reference generic object for AfterUpdate()
    By Bob Berg in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-21-2012, 10:14 AM
  4. [SOLVED] Generic Current Object Reference Inside that Object's Code
    By Aegwyn11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2012, 01:23 PM
  5. In Procedure: When use Actual Range Object vs Create Local Object Using Set
    By Filibuster in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-20-2012, 02:21 PM
  6. Copy a range of generic cells.
    By Mordred in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2010, 12:30 PM
  7. [SOLVED] Range Question / error 1004: method Range of object Worksheet has failed
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2005, 10:06 AM

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