Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Opening workbook automatically as Read-0nly

I save a workbook to a public drive. It's a copy of a workbook I update
each night. I want folks here to bring up this workbook duing the day
to look up records. This is to be for view only. There will be multiple
users that will have this workbook open during the day.

Is there a way for the workbook to come up in Read-only mode, without
the message box telling you that the workbook is already open? They
would naturally accept the Read-Only mode from the message box. But, I
don't want there to be any confusion from users who don't normally use
Excel, or other programs where you can see this message. I also don't
want anyone clicking the "Notify..." button, either.

So, I'd like to save this file so that it will come up as read-only
without any message box.
Is this possible? I've looked in past posts, and don't see anything
dealing with this as a default setting.
Thanks,
J.O.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Opening workbook automatically as Read-0nly

Excel respects the file attributes that you can set in Windows Explorer.

If you mark that file as ReadOnly using Windows Explorer, your users will not be
prompted when they open the workbook.


excelnut1954 wrote:

I save a workbook to a public drive. It's a copy of a workbook I update
each night. I want folks here to bring up this workbook duing the day
to look up records. This is to be for view only. There will be multiple
users that will have this workbook open during the day.

Is there a way for the workbook to come up in Read-only mode, without
the message box telling you that the workbook is already open? They
would naturally accept the Read-Only mode from the message box. But, I
don't want there to be any confusion from users who don't normally use
Excel, or other programs where you can see this message. I also don't
want anyone clicking the "Notify..." button, either.

So, I'd like to save this file so that it will come up as read-only
without any message box.
Is this possible? I've looked in past posts, and don't see anything
dealing with this as a default setting.
Thanks,
J.O.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Opening workbook automatically as Read-0nly

Excellent, Dave.
Thanks

Going 1 further. Someone leaves this workbook open all night. The
workbook is updated at the end of each day. Will there be any errors
saving to the same workbook name if it is still open?

Thanks again
J.O.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Opening workbook automatically as Read-0nly

I think you'll have to test.

I worked ok when I did this:
Created a test workbook (book1.xls)
closed excel
used windows explorer to mark it readonly

reopened excel and that book1.xls (as readonly)
opened windows explorer and deleted the readonly file

Opened another instance of excel
created book1.xls
saved it
closed excel
used windows explorer to mark it readonly

The first instance of excel still was looking at the older/deleted version,
though.

I used winXP Home for my tests--and xl2003 (but I wouldn't guess that the
version of office played any role).

(I'm guessing that all versions of windows would react the same--but that's just
a wild guess.)

excelnut1954 wrote:

Excellent, Dave.
Thanks

Going 1 further. Someone leaves this workbook open all night. The
workbook is updated at the end of each day. Will there be any errors
saving to the same workbook name if it is still open?

Thanks again
J.O.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Opening workbook automatically as Read-0nly

I appreaciate the info, Dave.

The read-only thing..... I see where you're talking about in Explorer.
Will I have to change this in Explorer manually each time? Sounds like
it. I was hoping to have code written in my end of day processing that
would take care of that. If not, then.... oh well. Not a huge thing
for this project.
Again, thanks for the help.

J.O.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Opening workbook automatically as Read-0nly

As long as you do things in the correct order, you should be ok:

With ActiveWorkbook
.Save
SetAttr .FullName, vbReadOnly
End With

If you change it to readonly first, then try to save, you may have some trouble
<bg.



excelnut1954 wrote:

I appreaciate the info, Dave.

The read-only thing..... I see where you're talking about in Explorer.
Will I have to change this in Explorer manually each time? Sounds like
it. I was hoping to have code written in my end of day processing that
would take care of that. If not, then.... oh well. Not a huge thing
for this project.
Again, thanks for the help.

J.O.


--

Dave Peterson
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
automatically save a read-only workbook with client last name John Galt[_2_] Excel Discussion (Misc queries) 2 January 13th 09 07:47 PM
opening workbook as read-only or write-enabled archiboy Excel Programming 1 January 31st 06 01:11 PM
automatically opening workbook Pinnacle Excel Discussion (Misc queries) 1 May 20th 05 12:48 AM
opening workbook as read-only Mariusz Excel Programming 2 May 25th 04 08:53 AM
Opening Excel Workbook from Word using VBA - Always Read Only Alan Excel Programming 0 November 5th 03 02:55 AM


All times are GMT +1. The time now is 11:06 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"