G
Guest
I want to put a macro (see below) on the sheet that does not exist in the
original "Template File".
Basically, after I run a specific macro on the "Template File". The sheet
where I want to put the new macro is been created and named it as a "LIST".
Therefore, my question is; what statement can I use to insert this module on
this new sheet (LIST) when I run the macro on the “Template File?
Thanks in advance.
Maperalia
‘***********************************
Public LastCell As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastCell Is Nothing Then
LastCell.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set LastCell = Target
End Sub
‘***********************************
original "Template File".
Basically, after I run a specific macro on the "Template File". The sheet
where I want to put the new macro is been created and named it as a "LIST".
Therefore, my question is; what statement can I use to insert this module on
this new sheet (LIST) when I run the macro on the “Template File?
Thanks in advance.
Maperalia
‘***********************************
Public LastCell As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastCell Is Nothing Then
LastCell.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set LastCell = Target
End Sub
‘***********************************