Thread: Tabs
View Single Post
  #7   Report Post  
Gord Dibben
 
Posts: n/a
Default

Marthaq

These are not formulas.

The code is event code and runs when you select a cell, enter something then
hit ENTER key.

Yes, it would work in 2003 also.


Gord Dibben Excel MVP

On Tue, 17 May 2005 10:35:16 -0700, MarthaSue
wrote:

Would these same formulas work in Excel 2003 as well?

"Gord Dibben" wrote:

Lyn

Another VBA method if you don't want to protect the sheet or cells.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A$2"
Range("B3").Select
Case "$B$3"
Range("E2").Select
Case "$E$2"
Range("E5").Select
'add as many cases as you wish
End Select
End Sub

When you hit <Enter key in A2 the cursor will jump to B3 and etc.

This code would be entered in the Worksheet module.

Click on sheet tab and "View Code". Copy/paste the code in there.


Gord Dibben Excel MVP

On Fri, 7 Jan 2005 21:49:17 +0100, "Ron de Bruin"
wrote:

Hi Lynn

You can use this code in the workbook open event.
Try this on a example workbook

Uncheck the locked property of all cells you want to use first
Select the cells
Ctrl-1
On the Protection tab uncheck locked

Right click on the Excel icon next to File in the Worksheet menu bar
Choose view code
Paste this event there
Alt-q to go back to Excel
Save/close/reopen the workbook

When you open the file you only can select unlocked cells
in each sheet.

Private Sub Workbook_Open()
Dim Sh As Worksheet
Application.ScreenUpdating = False
For Each Sh In ThisWorkbook.Worksheets
Sh.Select
Sh.Protect userinterfaceonly:=True
Sh.EnableSelection = xlUnlockedCells
Next
Sheets(1).Select
Application.ScreenUpdating = True
End Sub