hi i need to enter this code IN EXCEL which formats any name entered to appear as (F. Last). However, i need to apply this code not directly in the applicable worksheet. I have a macro on a file called M.A.P. that opens the DUMMY file, inserts a column and makes the user enter a new name in the empty cell. This name is then updated using another macro back to the M.A.P. file. I would like to add this code to the first macro or second whichever is easier so that when a name gets entered it gets auoformatted by the code. I can not leave it in the DUMMY file because it constantly gets updated from access and becomes overwrited.
SO how do i add the code below to my macro to make it work. The macro is at the bottom of this screen. Thanks alot.


CODE TO FORMAT NAME

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, ActiveSheet.Range("A:A")) _
Is Nothing Then
Dim strCell As String
Dim strRet As String
Dim intMid As Integer
strCell = Target.Value
If Not IsNumeric(strCell) And strCell <> "" Then
Application.EnableEvents = False
intMid = InStr(1, strCell, " ", 1)
strRet = Left(strCell, 1) & ". " & _
Right(strCell, Len(strCell) - intMid)
Target.Value = strRet
Application.EnableEvents = True
End If
End If
End Sub


CODE FOR 1ST MACRO

Sub AddNewName()
'
' AddNewName Macro
'

ChDir "G:New Ideas"
Workbooks.Open FileName:="svus3xsdm03auditNew IdeasMACRO.xls"
Workbooks.Open FileName:="svus3xsdm03auditNew Ideasdummy.xls"
Columns("A:A").EntireColumn.AutoFit
Range("A2").Select
Selection.Insert Shift:=xlDown
Range("A2").Select
Selection.Interior.ColorIndex = xlNone
Range("B2").Select
ActiveCell.FormulaR1C1 = "Please enter New Name"""
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"Please enter ""New Name"" in blank cell A2 and Press button below"
Range("B3").Select
Application.CommandBars("Forms").Visible = True
ActiveSheet.Buttons.Add(282, 42.75, 156.75, 51.75).Select
Selection.OnAction = "MACRO.xls!BUTTON"
ActiveSheet.Shapes("Button 1").Select
Selection.Characters.Text = "Click After New Name Has " & Chr(10) & "Been Entered"
With Selection.Characters(Start:=1, Length:=38).Font
.Name = "MS Sans Serif"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 49
End With
Range("B2:H2").Select
Selection.Font.ColorIndex = 5
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
Range("A2").Select
Application.CommandBars("Forms").Visible = False
Range("A2").Select
ActiveWorkbook.Save
End Sub

WHERE CAN I PASTE MY CODE TO, DO I HAVE TO EDIT THE CODE TO TELL IT WHICH FILE TO EFFECT???????????????????????

THANKS,

EDDIE