Hey all,
Just trying to muster up a script for a spreadsheet at work,
i have no skills in vb but by reading a few articles on the net i have managed to knock a script up that will automatically enter information into the adjacent cells when a referance number is put in.
I expect the script maybe wrong but it actually works fine at the min. the problem been is that i need the script to runa on all pages and i need it to run on newly created worksheets.

The script is as follows (i Have changed cell values due to it been personal data)


Private Sub Worksheet_Change(ByVal Target As Range)
If Target = "E1" Then
Target.Offset(, 1) = "Periodic Inspection & Survey"
Target.Offset(, 2) = "195"
End If

If Target = "E2" Then
Target.Offset(, 1) = "Rewire 1 Bed Bungalow"
Target.Offset(, 2) = "2358"
End If

If Target = "E3" Then
Target.Offset(, 1) = "Rewire 2 Bed Bungalow"
Target.Offset(, 2) = "2478"
End If

If Target = "E4" Then
Target.Offset(, 1) = "Rewire 3 Bed Bungalow"
Target.Offset(, 2) = "2785"
End If

If Target = "E5" Then
Target.Offset(, 1) = "Rewire 2 Bed House"
Target.Offset(, 2) = "2900"
End If

If Target = "E6" Then
Target.Offset(, 1) = "Rewire 3 Bed House"
Target.Offset(, 2) = "3160"
End If

If Target = "E7" Then
Target.Offset(, 1) = "Rewire 4 Bed House"
Target.Offset(, 2) = "3240"

End If




If Intersect(Target, Range("A11:A29")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End Sub

This is saved as the code for sheet 1

when i open a new sheet it has no code

i have tried saving this in the 'workbook' page but had no luck!

it wont let me upload the file due to it been a xlsm filetype!

im at my wits end! Please help!!
Dan