+ Reply to Thread
Results 1 to 4 of 4

Referencing a range problem

  1. #1
    Registered User
    Join Date
    08-31-2010
    Location
    Brighton,Earth
    MS-Off Ver
    Excel 2003
    Posts
    25

    Referencing a range problem

    Sorry about the long winded code posting as you can ignore most of it, just thought you might like to see how atrocious my coding is! I am using the code to learn about classes. I am tearing my hair out on the bold line below as it keeps throwing up this error....What I am doing is moving a range from a worksheet to a file.

    Application defined or Object defined error

    Any idea why it doesn't like it. Have tried entering a literal value for the range and its happy with that but when I put in the range object it screams.

    Cheers
    Guss


    ########## code module #########
    Please Login or Register  to view this content.


    ########## class module #########
    Please Login or Register  to view this content.
    Excel VBA 2003
    Brace yourselves for lots of stupid questions !!!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,429

    Re: Referencing a range problem

    Try changing:

    Please Login or Register  to view this content.

    To:

    Please Login or Register  to view this content.

    as RangeToFILE is defined as a Range.


    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-31-2010
    Location
    Brighton,Earth
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Referencing a range problem

    Quote Originally Posted by TMShucks View Post
    Try changing:

    Please Login or Register  to view this content.

    To:

    Please Login or Register  to view this content.

    as RangeToFILE is defined as a Range.


    Regards
    Yup tried that and I got another error....

    "Object doesn't support this property or method"


  4. #4
    Registered User
    Join Date
    08-31-2010
    Location
    Brighton,Earth
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Referencing a range problem

    I should add its important to me to know what I am doing wrong than someone handing me a solution thats different from what I have done.

    But I do appreciate any contributions

    Guss

+ Reply to Thread

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