Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to read file

Hi,
In VBA I have this line
Workbooks.Open sAFMAPathName & sFileName

when in auto it gives a error message 'Unable to read file' when I single
step (F8), it works fine.
This section of the code comes from another excel VBA code block which works
fine, if a bit slow.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Unable to read file

If it works fine when stepping through then most likely there is some delay
in creating or releasing the file you're trying to open.
Where does it come from ?

Tim

"MarkS" wrote in message
...
Hi,
In VBA I have this line
Workbooks.Open sAFMAPathName & sFileName

when in auto it gives a error message 'Unable to read file' when I single
step (F8), it works fine.
This section of the code comes from another excel VBA code block which
works
fine, if a bit slow.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to read file

Hi Tim,
from a remote server, but some work fine and others don't

MarkS

"Tim Williams" wrote:

If it works fine when stepping through then most likely there is some delay
in creating or releasing the file you're trying to open.
Where does it come from ?

Tim

"MarkS" wrote in message
...
Hi,
In VBA I have this line
Workbooks.Open sAFMAPathName & sFileName

when in auto it gives a error message 'Unable to read file' when I single
step (F8), it works fine.
This section of the code comes from another excel VBA code block which
works
fine, if a bit slow.

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Unable to read file

Do the files which give problems fail consistently ?

Tim


"MarkS" wrote in message
...
Hi Tim,
from a remote server, but some work fine and others don't

MarkS

"Tim Williams" wrote:

If it works fine when stepping through then most likely there is some
delay
in creating or releasing the file you're trying to open.
Where does it come from ?

Tim

"MarkS" wrote in message
...
Hi,
In VBA I have this line
Workbooks.Open sAFMAPathName & sFileName

when in auto it gives a error message 'Unable to read file' when I
single
step (F8), it works fine.
This section of the code comes from another excel VBA code block which
works
fine, if a bit slow.

Thanks






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to read file

Yes Its always the same ones but opening them and resaving them doesn't help

"Tim Williams" wrote:

Do the files which give problems fail consistently ?

Tim


"MarkS" wrote in message
...
Hi Tim,
from a remote server, but some work fine and others don't

MarkS

"Tim Williams" wrote:

If it works fine when stepping through then most likely there is some
delay
in creating or releasing the file you're trying to open.
Where does it come from ?

Tim

"MarkS" wrote in message
...
Hi,
In VBA I have this line
Workbooks.Open sAFMAPathName & sFileName

when in auto it gives a error message 'Unable to read file' when I
single
step (F8), it works fine.
This section of the code comes from another excel VBA code block which
works
fine, if a bit slow.

Thanks








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Unable to read file

No thats no right, The first one always loads fine and the next one has the
problem

"MarkS" wrote:

Yes Its always the same ones but opening them and resaving them doesn't help

"Tim Williams" wrote:

Do the files which give problems fail consistently ?

Tim


"MarkS" wrote in message
...
Hi Tim,
from a remote server, but some work fine and others don't

MarkS

"Tim Williams" wrote:

If it works fine when stepping through then most likely there is some
delay
in creating or releasing the file you're trying to open.
Where does it come from ?

Tim

"MarkS" wrote in message
...
Hi,
In VBA I have this line
Workbooks.Open sAFMAPathName & sFileName

when in auto it gives a error message 'Unable to read file' when I
single
step (F8), it works fine.
This section of the code comes from another excel VBA code block which
works
fine, if a bit slow.

Thanks






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
Unable to read file Greg Excel Discussion (Misc queries) 4 August 23rd 09 11:08 AM
Unable to Read File steenman2 Links and Linking in Excel 1 July 22nd 06 07:33 AM
Unable to Read File steenman2 Excel Discussion (Misc queries) 0 July 21st 06 02:43 PM
unable to read file phrenchie Excel Discussion (Misc queries) 0 January 16th 06 07:59 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM


All times are GMT +1. The time now is 02:27 PM.

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

About Us

"It's about Microsoft Excel"