Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Copy the formula from the protected cells

Hello all,

I have an Excel file that the users input the information. The sheet in the
file contains 10 columns (A-J), and the columns B,C,D and G are protected and
formula-driven. The way I have setup is the users can insert a new row
between two rows. The problem I am having is since some of the columns are
protected, the formula in those cells are not copied to the protected new
cells on the new row.

Is there a code that does the copying of the formula from the above
protected cell? Other suggestions are welcomed.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copy the formula from the protected cells

Hi AccessHelp,

See David McRitchie's InsertRowsAndFillFormulas sub at:

http://www.mvps.org/dmcritchie/excel/insrtrow.htm

To deal wirh the protection issue, you could assign the macro to a button
and either:

(1) Turn protection off at the start of the macro and restore protection at
the end, or

(2) Setting the Protect method's UserInterfaceOnly parameter to true enables
VBA manipulation of the protected sheet. However, this setting is not
persistent and needs to be reset each time the workbook is opened.

Perhaps, therefore, you could set protection in the Workbook_Open or
Auto_Open procedures, e.g.:

'============
Sub Auto_Open()
With Worksheets("sheet1")
.Protect Password:="drowssap", UserInterfaceOnly:=True
End With
End Sub
'<<============

---
Regards,
Norman



"AccessHelp" wrote in message
...
Hello all,

I have an Excel file that the users input the information. The sheet in
the
file contains 10 columns (A-J), and the columns B,C,D and G are protected
and
formula-driven. The way I have setup is the users can insert a new row
between two rows. The problem I am having is since some of the columns
are
protected, the formula in those cells are not copied to the protected new
cells on the new row.

Is there a code that does the copying of the formula from the above
protected cell? Other suggestions are welcomed.

Thanks.



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
insert row and copy formula in protected worksheet puting_uwak[_2_] Excel Discussion (Misc queries) 5 November 3rd 10 11:39 AM
How can I copy/paste protected cells in excel JeneeLynn Excel Discussion (Misc queries) 0 April 18th 08 06:09 PM
Copy formula from above cell in protected worksheet Nav Excel Discussion (Misc queries) 0 January 23rd 08 01:37 AM
Copy/Cut/Paste of Merged Cells in Shared Protected Workbooks DaveyC4S Excel Discussion (Misc queries) 0 September 20th 05 01:24 PM
Copy of protected document was unprotected in 97 and protected in 2002 Beth Mantoan Excel Programming 0 July 31st 03 10:40 PM


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