Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well I am nearly finished with my first ever Excel spreadsheet
using VB! Thanks to all of you here who have helped me out sooo much! I could have picked a much easier project but I would not learn as much as I have already. I am also looking around for good books to help me along further. I have one last problem with “Project One” It adds and removes data lines quite nicely, it all was working great, until…I wanted to protect all the cells, rows and formatting from being messed up by a user, so I protected the worksheet. The problem is now that my code is not being allowed to Insert, delete, and reformat the cells as need. It crashes with a “Run Time error 1004” Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Unprotect before the inserts and deletes, do that, the protect again.
-- HTH RP (remove nothere from the email address if mailing direct) "Dean Goodmen" wrote in message ... Well I am nearly finished with my first ever Excel spreadsheet using VB! Thanks to all of you here who have helped me out sooo much! I could have picked a much easier project but I would not learn as much as I have already. I am also looking around for good books to help me along further. I have one last problem with "Project One" It adds and removes data lines quite nicely, it all was working great, until.I wanted to protect all the cells, rows and formatting from being messed up by a user, so I protected the worksheet. The problem is now that my code is not being allowed to Insert, delete, and reformat the cells as need. It crashes with a "Run Time error 1004" Any suggestions? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dean,
You can set the UserInterfaceOnly argument to the Protect method to True (works for Sheet-level protection only) via code. This will allow your code to modify the sheet, but will protect it against changes by the user. This setting only lasts as long as the workbook is open - when you reopen, it will revert to being "fully-protected". If you want this behavior every time the workbook opens, you could put the following line of code in the Workbook_Open event subroutine: Sheet1.Protect Password:="test", UserInterfaceOnly:=True -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Dean Goodmen wrote: Well I am nearly finished with my first ever Excel spreadsheet using VB! Thanks to all of you here who have helped me out sooo much! I could have picked a much easier project but I would not learn as much as I have already. I am also looking around for good books to help me along further. I have one last problem with "Project One" It adds and removes data lines quite nicely, it all was working great, until.I wanted to protect all the cells, rows and formatting from being messed up by a user, so I protected the worksheet. The problem is now that my code is not being allowed to Insert, delete, and reformat the cells as need. It crashes with a "Run Time error 1004" Any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell protection issues | Excel Discussion (Misc queries) | |||
worksheet protection issues | Excel Worksheet Functions | |||
Worksheet protection issues - HELP! | Excel Discussion (Misc queries) | |||
protection issues . . . HELP! | Excel Discussion (Misc queries) | |||
Protection issues | Excel Discussion (Misc queries) |