Consulting

Results 1 to 2 of 2

Thread: Copy fail in Automation

  1. #1

    Copy fail in Automation

    I use code :

    Dim wb as Variant
    set wb = Excel.WorkBooks.Open(path)
    Windows(FileName).Activate 'FileName is the name of excel file which is
    'opened by using Excel.WorkBooks.Open and it's path is path variable

    Sheets(1).Select
    Range("A1:B3").Select
    Selection.Copy

    When that code is run, it alert "Copy fail in Automation ..... ".

    How could i copy content of a file in Automation?

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Cross posted here

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •