Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
I have written the code below to ensure some key info is always visible in cells whether or not users unprotect the worksheet and delete the contents. The code is password protected. Private Sub Workbook_Open() Sheets("Sheet1").Select Range("A1").Font.ColorIndex = 51 Range("A1:B1").Interior.Color = RGB(211, 206, 177) Range("A1").Value = "KEEP THIS TEXT" Selection.Locked = True End Sub The problem I have is, I can make this work on 1 sheet, but don't have a clue how to use it on other worksheets (eg, Sheet2, Sheet3, Sheet4, etc) in the workbook without repeating the code and changing the sheet reference. The relevant cell is the same on every sheet, A1. Please can someone advise how to modify the vb so I can do this? Thanks - help would be much appreciated Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locked Several Worksheets, allow format cells/select unlocked cell | Excel Discussion (Misc queries) | |||
FormatCellsSpecialZip Code | Excel Worksheet Functions | |||
Format Cells by code | Excel Worksheet Functions | |||
Get multiple cells from all worksheets Code Not Work | Excel Programming | |||
Update Format of cells in multiple worksheets | Excel Programming |