+ Reply to Thread
Results 1 to 4 of 4

Selecting WorkSheets

  1. #1
    Jordan
    Guest

    Selecting WorkSheets

    Hello,

    I have code where i open up a worksheet and then i transfer imformation from
    another sheet into it. This requireds a lot of going back betweet worksheets.
    Workbooks.Open Filename:="K:\Purchasing
    Documents\Railcar\ApprovedSupplier.xls"
    'some more code
    Workbooks.Open Filename:="K:\Purchasing Documents\Railcar\DrawingACK.xls"
    'some more code
    Workbooks("ApprovedSupplier").Activate

    most of the time that works just fine, but every once in awhile if i am
    using the program on another computer it will give me an error as if it
    doesn't recognize that the file is already open.

    Any thoughts on why that might happen?

    Thanks,
    Jordan

  2. #2
    Dave Peterson
    Guest

    Re: Selecting WorkSheets

    Try including the file extension, too:

    Workbooks("ApprovedSupplier").Activate
    becomes
    Workbooks("ApprovedSupplier.xls").Activate

    There's a windows setting that allows users to hide extensions of known file
    types. And with that enabled, I bet your existing code works ok.

    But including the .xls removes all worry.

    Jordan wrote:
    >
    > Hello,
    >
    > I have code where i open up a worksheet and then i transfer imformation from
    > another sheet into it. This requireds a lot of going back betweet worksheets.
    > Workbooks.Open Filename:="K:\Purchasing
    > Documents\Railcar\ApprovedSupplier.xls"
    > 'some more code
    > Workbooks.Open Filename:="K:\Purchasing Documents\Railcar\DrawingACK.xls"
    > 'some more code
    > Workbooks("ApprovedSupplier").Activate
    >
    > most of the time that works just fine, but every once in awhile if i am
    > using the program on another computer it will give me an error as if it
    > doesn't recognize that the file is already open.
    >
    > Any thoughts on why that might happen?
    >
    > Thanks,
    > Jordan


    --

    Dave Peterson

  3. #3
    Tom Ogilvy
    Guest

    Re: Selecting WorkSheets

    Nothing jumps to mind - possibly your code is faulty.

    --
    Regards,
    Tom Ogilvy

    "Jordan" <Jordan@discussions.microsoft.com> wrote in message
    news:2DD49D6B-0B45-4F1D-8756-5D8BE625D725@microsoft.com...
    > Hello,
    >
    > I have code where i open up a worksheet and then i transfer imformation

    from
    > another sheet into it. This requireds a lot of going back betweet

    worksheets.
    > Workbooks.Open Filename:="K:\Purchasing
    > Documents\Railcar\ApprovedSupplier.xls"
    > 'some more code
    > Workbooks.Open Filename:="K:\Purchasing

    Documents\Railcar\DrawingACK.xls"
    > 'some more code
    > Workbooks("ApprovedSupplier").Activate
    >
    > most of the time that works just fine, but every once in awhile if i am
    > using the program on another computer it will give me an error as if it
    > doesn't recognize that the file is already open.
    >
    > Any thoughts on why that might happen?
    >
    > Thanks,
    > Jordan




  4. #4
    Tom Ogilvy
    Guest

    Re: Selecting WorkSheets

    This answer was intended to be posted to your previous question.

    --
    Regards,
    Tom Ogilvy

    "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    news:eMvu8p2GFHA.2804@TK2MSFTNGP10.phx.gbl...
    > Nothing jumps to mind - possibly your code is faulty.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Jordan" <Jordan@discussions.microsoft.com> wrote in message
    > news:2DD49D6B-0B45-4F1D-8756-5D8BE625D725@microsoft.com...
    > > Hello,
    > >
    > > I have code where i open up a worksheet and then i transfer imformation

    > from
    > > another sheet into it. This requireds a lot of going back betweet

    > worksheets.
    > > Workbooks.Open Filename:="K:\Purchasing
    > > Documents\Railcar\ApprovedSupplier.xls"
    > > 'some more code
    > > Workbooks.Open Filename:="K:\Purchasing

    > Documents\Railcar\DrawingACK.xls"
    > > 'some more code
    > > Workbooks("ApprovedSupplier").Activate
    > >
    > > most of the time that works just fine, but every once in awhile if i am
    > > using the program on another computer it will give me an error as if it
    > > doesn't recognize that the file is already open.
    > >
    > > Any thoughts on why that might happen?
    > >
    > > Thanks,
    > > Jordan

    >
    >




+ 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