Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default Read Only files

I have a macro that goes to a specific folder and opens up any Excel file in
that folder. It then does some stuff to each file, closes the file, and
repeats this process for each file in the folder.

It works great 99 % of the time. Ocassionaly, a user will send in a "read
only" file. When the macro opens one of these "read only" files, it causes
the macro to fail.

Is it possible to select a file and tell if it is "read only" before opening
it? Is it possible to tell if it is "read only" after it has been opened and
before the macro does any stuff to it?

I would like to check if it is "read only" and skip this file if possible.
Any suggestions or peices of code to accomplish this would be greatly
appreciated. Thanks for the help.....

--
JT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Read Only files

opens up any Excel file

Open the workbook in the normal way and check its ReadOnly property

Regards,
Peter T

"JT" wrote in message
...
I have a macro that goes to a specific folder and opens up any Excel file
in
that folder. It then does some stuff to each file, closes the file, and
repeats this process for each file in the folder.

It works great 99 % of the time. Ocassionaly, a user will send in a "read
only" file. When the macro opens one of these "read only" files, it
causes
the macro to fail.

Is it possible to select a file and tell if it is "read only" before
opening
it? Is it possible to tell if it is "read only" after it has been opened
and
before the macro does any stuff to it?

I would like to check if it is "read only" and skip this file if possible.
Any suggestions or peices of code to accomplish this would be greatly
appreciated. Thanks for the help.....

--
JT



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
trying to save all files xls says can't - read only Kris Excel Discussion (Misc queries) 1 August 3rd 08 05:34 PM
Read From Files Jeff Excel Discussion (Misc queries) 1 June 3rd 08 08:29 PM
Shared files - read only on the fly Wanda Excel Discussion (Misc queries) 4 September 26th 07 04:20 PM
read only files Delores Excel Discussion (Misc queries) 1 December 27th 06 02:12 AM
how can i convert .dxf files to something i can read Krysy Albutt Excel Discussion (Misc queries) 1 April 26th 05 01:57 PM


All times are GMT +1. The time now is 01:32 PM.

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"