Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
joo joo is offline
external usenet poster
 
Posts: 11
Default ChangeFileAccess

I made a .xls file a readonly file by making it readonly from the properties.
However, when I send this through e-mail and the user detach it from the
e-mail, it becomes writable.
So I put a code in Thisworkbook.Open

ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

If I do that, when I open up the file, it changes itself to readonly but it
will ask you if I want save changes before swithcing file status. I don't
want the user to see this pop up window. Is there anyway to by pass this or
even better way to make the file readonly when the user open it?

Thank you for your help in advance.
ps. I'm using Excel 2000
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default ChangeFileAccess

Hi

I haven't tried it but you could make it

Thisworkbook.Saved=True
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

That way it will appear to the macro that there are no changes to save so
you won't get asked (theorectically)

Doug


Joo wrote in message ...
I made a .xls file a readonly file by making it readonly from the

properties.
However, when I send this through e-mail and the user detach it from the
e-mail, it becomes writable.
So I put a code in Thisworkbook.Open

ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly

If I do that, when I open up the file, it changes itself to readonly but it
will ask you if I want save changes before swithcing file status. I don't
want the user to see this pop up window. Is there anyway to by pass this or
even better way to make the file readonly when the user open it?

Thank you for your help in advance.
ps. I'm using Excel 2000



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
ChangeFileAccess Tom Ogilvy Excel Programming 1 May 26th 05 09:52 PM
ChangeFileAccess Tom Ogilvy Excel Programming 0 May 26th 05 09:34 PM


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