+ Reply to Thread
Results 1 to 5 of 5

selecting a different document

  1. #1
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    selecting a different document

    this is going to be elementary question 101, but although I've seen the programming format for these numerous times I can't find it in my manual.

    I using the SELECT() function, e.g. SELECT("R1C14:R5C19") in the old XML language I think it is - my Excel 2.2 manual isn't kind enough to mention what the programming language is.

    Anyway I have selected and then used the COPY() function to copy a group of cells and I want to go to another document and paste them and I can't remember the format for putting a different target workbook that is not the active workbook into the formula for the Select Function front, so it brings to the front the document I want to paste into and then selects my target range. This will be a document that is already open.

    Thanks,

    Brian

    Brian

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: selecting a different document

    If the document is already open then you can use

    Please Login or Register  to view this content.
    (modify to suit, of course)
    or you could do the whole thing in one statement instead of a separate copy and paste
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: selecting a different document

    Quote Originally Posted by 6StringJazzer View Post
    If the document is already open then you can use

    Please Login or Register  to view this content.
    (modify to suit, of course)
    or you could do the whole thing in one statement instead of a separate copy and paste
    Please Login or Register  to view this content.
    6string -- if I can be informal -

    that looks like visual basic to me. I misacronymed, I'm programming in XLM . Which I believe was the macro language up to about Excel 4.0 .

    Cross posted this question on Mr. Excel that I found by googling to make sure I was identifying the language correctly.

    Also I did find a reference to changing worksheets in the one manual I have which is Excel in Business, a third party reference that addresses the 2.2 Mac Version.

    I believe back in 2.2 you didn't have separate worksheets within a single document so when they talk about changing worksheets they are actually talking about changing documents so the explanation is probably a little obscure as to the present circumstance but I gave it a try.

    This manual says all you have to do is name the worksheet followed by an exclamation point before the reference. I'm trying to use the SELECT() function although all the examples I find in the manual are FORMULA.GOTO()

    the syntax examples they call out are

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    I've tried both styles of references with SELECT and FORMULA.GOTO to move to an open document. I tried substituting both the name of the workbook and the name of the worksheet within the workbook and putting them together separated by a period and then gave up and came back to the net.

    thanks,

    Brian

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: selecting a different document

    Quote Originally Posted by riwiseuse View Post
    6string -- if I can be informal
    You can call me 6 Actually my name IRL is Jeff, so that's fine too.

    that looks like visual basic to me. I misacronymed, I'm programming in XLM . Which I believe was the macro language up to about Excel 4.0 .
    I misunderstood what you needed, I thought there was something you knew how to do in the old macro language and wanted to do the same thing in VBA.

    I will be quite useless for any macro programming in XLM. You may get more nibbles on your thread if you update the title to add " in XLM macros".

  5. #5
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    Re: selecting a different document

    Quote Originally Posted by 6StringJazzer View Post
    You can call me 6 Actually my name IRL is Jeff, so that's fine too.

    I misunderstood what you needed, I thought there was something you knew how to do in the old macro language and wanted to do the same thing in VBA.

    I will be quite useless for any macro programming in XLM. You may get more nibbles on your thread if you update the title to add " in XLM macros".
    Thanks for checking back. I get the syntax and can learn the language of VBE but I just cannot figure out very easily how you go from the visual basic module to actually establishing a working macro. I've reverse engineered this a few times by recording a macro and then it is already made into a macro and I can bring up the language and edit it a little bit but I just cannot figure out how you start a project from scratch and write it.

    It is not that is was so obvious in XLM. you had to know that you used the define names command which isn't a particularly obvious or intuitive approach, and then you selected the first cell of the macro where you used the cell metaphor as lines in a program.

    But I Got an answer at Mr. Excel. The ACTIVATE function takes worksheet references fine that were being rejected in FORMULA.GOTO and SELECT . I don't know why that is but I'm not complaining. it gets the job done.

    Now I'm off to start another thread because I can't get the FORMAT.FONT function working and I will put XLM in the title as you suggest.

    thanks,

    brian

+ 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