+ Reply to Thread
Results 1 to 2 of 2

Using Ref edit in Add in to save to a different sheet.

  1. #1
    c4clark
    Guest

    Using Ref edit in Add in to save to a different sheet.

    Hey, I have built an Add In and want to be able to save to a different sheet
    than the one I opened the tool on. It keeps giving me an error: SELECT METHOD
    OF RANGE CLASS FAILED. This seems odd since the REf Edit has both the sheet
    and the cell in it? Any suggestions?
    --
    Clare CLark

  2. #2
    Jon Peltier
    Guest

    Re: Using Ref edit in Add in to save to a different sheet.

    You have to split the sheet name from the address, and reference like

    Worksheets("SheetName").Range("A2:Z50")

    Also, if your code selects cells during the process (usually you should
    program it not to do so), if the sheet you want isn't active or activated
    first, you'll get an error using the select method, as you've found.

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______

    "c4clark" <noway.com> wrote in message
    news:[email protected]...
    > Hey, I have built an Add In and want to be able to save to a different
    > sheet
    > than the one I opened the tool on. It keeps giving me an error: SELECT
    > METHOD
    > OF RANGE CLASS FAILED. This seems odd since the REf Edit has both the
    > sheet
    > and the cell in it? Any suggestions?
    > --
    > Clare CLark




+ 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