Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Selecting WorkSheets

Nothing jumps to mind - possibly your code is faulty.

--
Regards,
Tom Ogilvy

"Jordan" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Selecting WorkSheets

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

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
Nothing jumps to mind - possibly your code is faulty.

--
Regards,
Tom Ogilvy

"Jordan" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue selecting other worksheets SLW612 Excel Discussion (Misc queries) 1 November 14th 08 04:53 PM
VBA question about selecting worksheets jlclyde Excel Discussion (Misc queries) 3 April 17th 08 04:39 PM
Selecting across worksheets JMS Excel Discussion (Misc queries) 1 July 14th 05 10:44 PM
selecting worksheets Matthew Kramer Excel Programming 1 August 16th 04 10:39 PM
Selecting worksheets without hardcoding Bob Phillips[_6_] Excel Programming 1 May 4th 04 09:01 PM


All times are GMT +1. The time now is 09:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"