+ Reply to Thread
Results 1 to 2 of 2

Open a file with a macro

Hybrid View

  1. #1
    Registered User
    Join Date
    06-23-2005
    Posts
    1

    Question Open a file with a macro

    Hi,

    I wonder if it's possible to create a macro that can open a file?
    I need a macro-solution for this problem:
    For example, if I change something in file1 and then run my macro and it will open file2 and copy some cells from file1 to file2 and then close file2 again.
    Can someone help me, please?

    //Vanity

  2. #2
    Bob Phillips
    Guest

    Re: Open a file with a macro

    Set oThis = ActiveWorkbook
    Workbooks.Open Filename:="Example.xls"
    oThis.Worksheets("Sheet1").Range("A1:H10").Copy ActiveSheet.Range("A1")
    ActiveWorkbook.Close

    --
    HTH

    Bob Phillips

    "Vanity" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > I wonder if it's possible to create a macro that can open a file?
    > I need a macro-solution for this problem:
    > For example, if I change something in file1 and then run my macro and
    > it will open file2 and copy some cells from file1 to file2 and then
    > close file2 again.
    > Can someone help me, please?
    >
    > //Vanity
    >
    >
    > --
    > Vanity
    > ------------------------------------------------------------------------
    > Vanity's Profile:

    http://www.excelforum.com/member.php...o&userid=24568
    > View this thread: http://www.excelforum.com/showthread...hreadid=381561
    >




+ 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