View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Corey[_4_] Corey[_4_] is offline
external usenet poster
 
Posts: 19
Default Enter code by a macro

Is it possible to create a macro to enter code via a Macro :

Sub Worksheet_SelectionChange(ByVal Target As Range)
' Enter code here via a Macro?

End Sub


If so how?


I have copied the code to another module named Replace VBA.

But how can i copy the code from there to the WorkSheet_SelectionChange
event by a macro?

I had a mass of code in the Worksheet_SelectionChange event, but found a
copy/paste error was generated because some of the cells were also in the
Worksheet_SelectionChange.

So i figured(IF POSSIBLE), i could have the Worksheet_SelectionChange empty,
until AFTER the Copy/Paste macro is run, then repopulate the
Worksheet_SelectionChange with the code from the ReplaceVBA.


Corey....