Closed Thread
Results 1 to 3 of 3

error 400

  1. #1
    JoeBo
    Guest

    error 400

    I open a workbook with vba, I then wish to copy data from the sheet to the
    host workbook. This works fine until I attempt to select a range in the
    opened sheet:

    Workbooks.Open FileName:=FileName


    Windows(FileName).Activate
    Range("B7:E18").Select

    The range select causes an error 400. Is this because the I am not opening
    the file with read write permissions?
    Anyone help with this.
    Thanks
    --
    JoeBo

  2. #2
    JoeBo
    Guest

    RE: error 400

    Found the answer.
    I was not specifying the sheet. instead of

    Range("B7:E18").Select
    I should have put:

    ActiveSheet.Range("B7:E18").Select


    "JoeBo" wrote:

    > I open a workbook with vba, I then wish to copy data from the sheet to the
    > host workbook. This works fine until I attempt to select a range in the
    > opened sheet:
    >
    > Workbooks.Open FileName:=FileName
    >
    >
    > Windows(FileName).Activate
    > Range("B7:E18").Select
    >
    > The range select causes an error 400. Is this because the I am not opening
    > the file with read write permissions?
    > Anyone help with this.
    > Thanks
    > --
    > JoeBo


  3. #3
    Registered User
    Join Date
    04-19-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: error 400

    I had an error 400 problem because i was trying to alter a hidden sheet - the error no longer appeared when i unhid it.

Closed 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