Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 23
Default Open to modify

I'm hoping this is an easy one for someone.
I have a macro that writes data to an archive sheet every time a button is pressed. This works fine.
However I now want the archive sheet viewable to everyone but only updateable by either the marco or a password.
to do this i have saved the Archive with a password to modify. That way users can open as read only. However i do not know what addition i need to make to my macro for it to open the Archive to add data to it.
So for instance i currently have:

Workbooks.Open (ExcelFileB), Password:= "12345"

but this is no help with the read only setting. I thought perhaps it would be a simple Workbooks.Modify, password "12345". or something like that.

can anyone help please?
PS this is Excel 2003
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Open to modify

Try...

Workbooks.Open (ExcelFileB), Password:= "12345", ReadOnly:=False

...since it is one of the args for the Open method. It would serve you
well to get familiar with the Object Browser!!!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Junior Member
 
Posts: 23
Default

thank you for this, although its not quite addressing the problem. but this could be my fault in not having the write to document set as read only.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Open to modify

thank you for this, although its not quite addressing the problem.
but this could be my fault in not having the write to document set as
read only.


What about applying sheet protection? This requires users to enter a
password in order to edit content. VBA can edit if you set it up
correctly and lock the project.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Open Excel sheet, modify, print and lock [email protected] Excel Programming 1 April 27th 08 01:11 PM
open then modify file via hyperlink retepallen Excel Programming 1 April 24th 08 03:44 PM
Is there an easy way to open a text file and modify only a part of it? muster Excel Programming 1 May 30th 07 03:18 AM
Unhide sheet on open only if password to modify is given Alex Excel Programming 1 March 13th 07 03:52 PM
Loop through, open, and modify all workbooks in file Jason Excel Programming 3 August 28th 05 09:58 PM


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