PC Review


Reply
Thread Tools Rate Thread

Can .xls make itself ReadOnly?

 
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      30th Oct 2006
I'm looking for transparent alternatives to the built-in procedures that make
a workbook 'read-only.' Specifically, I'm looking for a way for a workbook
(that is not read-only) to make itself read-only each time it opens.

I'm searching for this solution because in my application, it is confusing
for users to see the "Password" dialog that states that "...the file is
reserved by... Enter a password for write access, etc....". The standard
approach to suppressing this dialog with application.displayalerts=false does
not work when implemented in the WorkBook_Open event procedure of the
ThisWorkbook object.

Also, I've checked the File's ReadOnly attribute in Windows Explorer, but
when emailed to another user, this attribute gets cleared (unchecked)
---
Thanks for any advice you VBA RockStars can provide,
Jay
 
Reply With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      30th Oct 2006
Why don't you want to use the built in capability for Read only
recommended. It doesn't require any password. The user can reject it.

Your reserved by message is a bit confusing. Are multiple people trying to
use the workbook at the same time?


--
Regards,
Tom Ogilvy



"Jay" <(E-Mail Removed)> wrote in message
news:709C1D86-2ED9-4CAC-9D05-(E-Mail Removed)...
> I'm looking for transparent alternatives to the built-in procedures that
> make
> a workbook 'read-only.' Specifically, I'm looking for a way for a workbook
> (that is not read-only) to make itself read-only each time it opens.
>
> I'm searching for this solution because in my application, it is confusing
> for users to see the "Password" dialog that states that "...the file is
> reserved by... Enter a password for write access, etc....". The standard
> approach to suppressing this dialog with application.displayalerts=false
> does
> not work when implemented in the WorkBook_Open event procedure of the
> ThisWorkbook object.
>
> Also, I've checked the File's ReadOnly attribute in Windows Explorer, but
> when emailed to another user, this attribute gets cleared (unchecked)
> ---
> Thanks for any advice you VBA RockStars can provide,
> Jay



 
Reply With Quote
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      30th Oct 2006
Hi Tom-
My workbook helps users append multiple text data files together to produce
a database list on a sheet. A custom Export procedure (assigned to a
button) saves the list sheet as a separate excel file and clears the list
preserving the template nature of the workbook so that it can be used to
produce another list (from another set of text source files).

When users see "Open as Read Only?" prompt, they think "Why would I open the
workbook as read-only if I'm going to be importing data into it; wouldn't I
need to save the workbook after I import data? I'm going to dismiss this
recommendation and open it as not Read-Only." Note: if you could customize
the 'read-only recommended prompt', I would agree that this would be the way
to go, but I don't think you can...).

As for the 'reserved by' message, that is produced when I save the workbook
with a writereservation (using Excel's File, SaveAs, Tools, GeneralOptions,
Password to modify). Opening a file saved with this general option produces
the 'reserved by...' message.
--
Jay


"Tom Ogilvy" wrote:

> Why don't you want to use the built in capability for Read only
> recommended. It doesn't require any password. The user can reject it.
>
> Your reserved by message is a bit confusing. Are multiple people trying to
> use the workbook at the same time?
>
>
> --
> Regards,
> Tom Ogilvy
>
>
>
> "Jay" <(E-Mail Removed)> wrote in message
> news:709C1D86-2ED9-4CAC-9D05-(E-Mail Removed)...
> > I'm looking for transparent alternatives to the built-in procedures that
> > make
> > a workbook 'read-only.' Specifically, I'm looking for a way for a workbook
> > (that is not read-only) to make itself read-only each time it opens.
> >
> > I'm searching for this solution because in my application, it is confusing
> > for users to see the "Password" dialog that states that "...the file is
> > reserved by... Enter a password for write access, etc....". The standard
> > approach to suppressing this dialog with application.displayalerts=false
> > does
> > not work when implemented in the WorkBook_Open event procedure of the
> > ThisWorkbook object.
> >
> > Also, I've checked the File's ReadOnly attribute in Windows Explorer, but
> > when emailed to another user, this attribute gets cleared (unchecked)
> > ---
> > Thanks for any advice you VBA RockStars can provide,
> > Jay

>
>
>

 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      30th Oct 2006
If you can insure your users will enable macros, then you can use event code
to run this macro command:

ThisWorkbook.ChangeFileAccess mode:=xlReadOnly


Then not use the writereserved option.

--
Regards,
Tom Ogilvy


"Jay" <(E-Mail Removed)> wrote in message
news:A17532B0-E3E5-4C95-B364-(E-Mail Removed)...
> Hi Tom-
> My workbook helps users append multiple text data files together to
> produce
> a database list on a sheet. A custom Export procedure (assigned to a
> button) saves the list sheet as a separate excel file and clears the list
> preserving the template nature of the workbook so that it can be used to
> produce another list (from another set of text source files).
>
> When users see "Open as Read Only?" prompt, they think "Why would I open
> the
> workbook as read-only if I'm going to be importing data into it; wouldn't
> I
> need to save the workbook after I import data? I'm going to dismiss this
> recommendation and open it as not Read-Only." Note: if you could
> customize
> the 'read-only recommended prompt', I would agree that this would be the
> way
> to go, but I don't think you can...).
>
> As for the 'reserved by' message, that is produced when I save the
> workbook
> with a writereservation (using Excel's File, SaveAs, Tools,
> GeneralOptions,
> Password to modify). Opening a file saved with this general option
> produces
> the 'reserved by...' message.
> --
> Jay
>
>
> "Tom Ogilvy" wrote:
>
>> Why don't you want to use the built in capability for Read only
>> recommended. It doesn't require any password. The user can reject it.
>>
>> Your reserved by message is a bit confusing. Are multiple people trying
>> to
>> use the workbook at the same time?
>>
>>
>> --
>> Regards,
>> Tom Ogilvy
>>
>>
>>
>> "Jay" <(E-Mail Removed)> wrote in message
>> news:709C1D86-2ED9-4CAC-9D05-(E-Mail Removed)...
>> > I'm looking for transparent alternatives to the built-in procedures
>> > that
>> > make
>> > a workbook 'read-only.' Specifically, I'm looking for a way for a
>> > workbook
>> > (that is not read-only) to make itself read-only each time it opens.
>> >
>> > I'm searching for this solution because in my application, it is
>> > confusing
>> > for users to see the "Password" dialog that states that "...the file is
>> > reserved by... Enter a password for write access, etc....". The
>> > standard
>> > approach to suppressing this dialog with
>> > application.displayalerts=false
>> > does
>> > not work when implemented in the WorkBook_Open event procedure of the
>> > ThisWorkbook object.
>> >
>> > Also, I've checked the File's ReadOnly attribute in Windows Explorer,
>> > but
>> > when emailed to another user, this attribute gets cleared (unchecked)
>> > ---
>> > Thanks for any advice you VBA RockStars can provide,
>> > Jay

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?SmF5?=
Guest
Posts: n/a
 
      30th Oct 2006
That completely nailed the issue, Tom. If I can ever do anything for you,
let me know.
--
Thanks a bunch,
Jay


"Tom Ogilvy" wrote:

> If you can insure your users will enable macros, then you can use event code
> to run this macro command:
>
> ThisWorkbook.ChangeFileAccess mode:=xlReadOnly
>
>
> Then not use the writereserved option.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Jay" <(E-Mail Removed)> wrote in message
> news:A17532B0-E3E5-4C95-B364-(E-Mail Removed)...
> > Hi Tom-
> > My workbook helps users append multiple text data files together to
> > produce
> > a database list on a sheet. A custom Export procedure (assigned to a
> > button) saves the list sheet as a separate excel file and clears the list
> > preserving the template nature of the workbook so that it can be used to
> > produce another list (from another set of text source files).
> >
> > When users see "Open as Read Only?" prompt, they think "Why would I open
> > the
> > workbook as read-only if I'm going to be importing data into it; wouldn't
> > I
> > need to save the workbook after I import data? I'm going to dismiss this
> > recommendation and open it as not Read-Only." Note: if you could
> > customize
> > the 'read-only recommended prompt', I would agree that this would be the
> > way
> > to go, but I don't think you can...).
> >
> > As for the 'reserved by' message, that is produced when I save the
> > workbook
> > with a writereservation (using Excel's File, SaveAs, Tools,
> > GeneralOptions,
> > Password to modify). Opening a file saved with this general option
> > produces
> > the 'reserved by...' message.
> > --
> > Jay
> >
> >
> > "Tom Ogilvy" wrote:
> >
> >> Why don't you want to use the built in capability for Read only
> >> recommended. It doesn't require any password. The user can reject it.
> >>
> >> Your reserved by message is a bit confusing. Are multiple people trying
> >> to
> >> use the workbook at the same time?
> >>
> >>
> >> --
> >> Regards,
> >> Tom Ogilvy
> >>
> >>
> >>
> >> "Jay" <(E-Mail Removed)> wrote in message
> >> news:709C1D86-2ED9-4CAC-9D05-(E-Mail Removed)...
> >> > I'm looking for transparent alternatives to the built-in procedures
> >> > that
> >> > make
> >> > a workbook 'read-only.' Specifically, I'm looking for a way for a
> >> > workbook
> >> > (that is not read-only) to make itself read-only each time it opens.
> >> >
> >> > I'm searching for this solution because in my application, it is
> >> > confusing
> >> > for users to see the "Password" dialog that states that "...the file is
> >> > reserved by... Enter a password for write access, etc....". The
> >> > standard
> >> > approach to suppressing this dialog with
> >> > application.displayalerts=false
> >> > does
> >> > not work when implemented in the WorkBook_Open event procedure of the
> >> > ThisWorkbook object.
> >> >
> >> > Also, I've checked the File's ReadOnly attribute in Windows Explorer,
> >> > but
> >> > when emailed to another user, this attribute gets cleared (unchecked)
> >> > ---
> >> > Thanks for any advice you VBA RockStars can provide,
> >> > Jay
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make exe file as readonly in CF sudheer Microsoft Dot NET Compact Framework 4 1st Jun 2006 06:37 PM
How to make a ComboBox ReadOnly? **Developer** Microsoft VB .NET 3 27th Jul 2005 09:37 PM
Datagrid - make readonly? =?Utf-8?B?U2FuZHk=?= Microsoft ASP .NET 1 14th Jul 2005 09:27 PM
Make combobox readonly =?Utf-8?B?Y2FzaGRlc2ttYWM=?= Microsoft C# .NET 1 30th Aug 2004 05:29 AM
Make HtmlTextArea Readonly on the fly =?Utf-8?B?TWljaGFlbCBTTA==?= Microsoft ASP .NET 3 18th Feb 2004 07:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 PM.