Paste text into a locked or hidden cell

  • Thread starter Thread starter sparx
  • Start date Start date
S

sparx

Is there any vba that will let you paste information into a cell that i
locked.

' Keyboard Shortcut: Ctrl+Shift+Z
'
Sheets("Access").Select
Range("E9:P9").Select
ActiveCell.FormulaR1C1 = "=getmacaddress()"
Range("E10").Select
End Sub

My worksheet "Access" has an area where you type in text
getmacaddress )
into an unlocked cell - no problems but I only want to do this when th
cell is locked and dont want the cell typed directly into
 
Unprotect the worksheet before you update the cell, modify the
cell, and reprotect the sheet. E.g.,

ActiveSheet.Unprotect password:="whatever"
ActiveCell.FormulaR1C1 = "=getmacaddress()"

ActiveSheet.Protect password:="whatever"



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"sparx" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top