ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ref Protected Worksheets (https://www.excelbanter.com/excel-programming/377322-ref-protected-worksheets.html)

WLMPilot

Ref Protected Worksheets
 
I have a worksheet (Order) that has Range A13:B90 unlocked and the sheet is
protected. I use a macro to force cursor movement left to right for Item# &
Qty, then cursor advances to next row in column A. Col A = Item # and Col B
= Qty.

User can input a valid item number (checked in macro). However, I have a
"0" (zero) as a generic item number that a user can enter. After entering a
qty for a zero item number, I have an inputbox pop up to ask for an item
description. Normally the item description is inserted automatically in
D13:D90 via a formula. This range is protected.

Question, using DIM ItemDesc As String" with this variable holding the value
input via inputbox, how do I insert this value into the cell. I have the
code to do it if the sheet is not protected, but I want the sheet to remain
protected.

Thanks,
Les

Jim Thomlinson

Ref Protected Worksheets
 
Why not just unprotect the sheet... do your stuff... and re-protect the sheet.

Sheets("Order").Unprotect Password:="Tada"
'do your stuff
Sheets("Order").Protect Password:="Tada"

--
HTH...

Jim Thomlinson


"WLMPilot" wrote:

I have a worksheet (Order) that has Range A13:B90 unlocked and the sheet is
protected. I use a macro to force cursor movement left to right for Item# &
Qty, then cursor advances to next row in column A. Col A = Item # and Col B
= Qty.

User can input a valid item number (checked in macro). However, I have a
"0" (zero) as a generic item number that a user can enter. After entering a
qty for a zero item number, I have an inputbox pop up to ask for an item
description. Normally the item description is inserted automatically in
D13:D90 via a formula. This range is protected.

Question, using DIM ItemDesc As String" with this variable holding the value
input via inputbox, how do I insert this value into the cell. I have the
code to do it if the sheet is not protected, but I want the sheet to remain
protected.

Thanks,
Les



All times are GMT +1. The time now is 09:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com