+ Reply to Thread
Results 1 to 6 of 6

Macro Open Workbook

  1. #1
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    Macro Open Workbook

    Can you have a macro in one workbook open another workbook?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Macro Open Workbook

    Yes, using a line of code like...

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    for a new one.
    Martin

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro Open Workbook

    Hello billykiller05,

    Yes.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Open Workbook

    Yes, I do it all the time.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    Re: Macro Open Workbook

    Those worked great. One more thing I have the code written to copy from a static file name and location however I need the paste to be in a workbook that the filename is not static. How can I set the paste workbook to look at the filename?

  6. #6
    Forum Contributor
    Join Date
    07-26-2006
    Posts
    141

    Re: Macro Open Workbook

    I need the TestM to be whatever the user has named the file they are using.

    Columns("A:K").Select
    Selection.Copy
    Windows("TestM").Activate
    Range("A1").Select
    Selection.PasteSpecial

+ 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