Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Read Write Programming

Greetings All:

I need to protect various workbooks sent out to salesmen.
I have the standard protection set up. I then made the files read only, but
this is interfering with a number of my macros.
None of the users are accostomed to accessing files thru "file Open", or
such like.
They are used to double clicking on the desired template master, which then
opens Excel AND the required file.
Is there a way I can insert a ReadOnly = False and a ReadONLY = True
statement, or something like that, in the following?

Option Explicit
Sub CdnContract()
' CdnContract Macro
Dim myBook As Workbook
Application.ScreenUpdating = False
Application.EnableEvents = False
Set myBook = ActiveWorkbook
Sheets("Contract").Activate
ActiveSheet.Unprotect Password:="XXXX"
Range("I2:L3").Select
Selection.Copy
Range("B2").Select
ActiveSheet.Paste

With myBook
.Save
End With

Application.EnableEvents = True
Application.ScreenUpdating = True
ActiveSheet.Protect Password:="XXXX"

End Sub


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
read only and write only zilah New Users to Excel 2 July 8th 07 03:01 PM
I have a read only xl file, I need it to be read and write drama queen Excel Discussion (Misc queries) 3 July 1st 06 12:25 AM
How can a file be converted from Read-Only to Read/Write Jim in Apopka Excel Discussion (Misc queries) 2 November 19th 05 04:59 PM
Who has read/write John Pritchard Excel Programming 0 September 28th 04 04:36 PM
write to/read from add-ins abartkowski Excel Programming 3 October 10th 03 04:33 PM


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