S
scott
Thanks to Chip Pearsons great website help, I am able to insert a
number of modules and procedures into files which are opened as txt,
processed in a number of ways and saved as xls files.
If the user makes changes in a particular column I want to record
those changes in a hidden column for export into a database.
I have managed to run code which does exactly what I want on
Worksheet_SelectionChange(ByVal Target As Range).
I worked around what I wanted to do by running a procedure on the
before Save event. However I would really like to record the value
changes cell by cell rather than a longer process on the before Save.
SO... I guess I am wondering what I change to insert a
Worksheet_SelectionChange(ByVal Target As Range) procedure.
I know am misunderstanding something.
my line which kills excel is:
Set VBCodeMod =
ActiveWorkbook.VBProject.VBComponents("Sheet1").CodeModule
This does work when the imported txt file is already open but if it is
called upon opening I send Microsoft messages about the state of my
computer when it choked.
Is this related to the actual sheet name being assigned the file name?
for instance 16135.txt opens and the sheet is called 16135.
And maybe I have misunderstood assigning "Sheet1" in place of
"ThisWorkBook".
As I say, all the procedures work when called and the txt file is
already open. It will add the procedure and do exactly as I want. Just
not upon opening.
And I mostly am trying to understand why.
Thank You all.
Scott
number of modules and procedures into files which are opened as txt,
processed in a number of ways and saved as xls files.
If the user makes changes in a particular column I want to record
those changes in a hidden column for export into a database.
I have managed to run code which does exactly what I want on
Worksheet_SelectionChange(ByVal Target As Range).
I worked around what I wanted to do by running a procedure on the
before Save event. However I would really like to record the value
changes cell by cell rather than a longer process on the before Save.
SO... I guess I am wondering what I change to insert a
Worksheet_SelectionChange(ByVal Target As Range) procedure.
I know am misunderstanding something.
my line which kills excel is:
Set VBCodeMod =
ActiveWorkbook.VBProject.VBComponents("Sheet1").CodeModule
This does work when the imported txt file is already open but if it is
called upon opening I send Microsoft messages about the state of my
computer when it choked.
Is this related to the actual sheet name being assigned the file name?
for instance 16135.txt opens and the sheet is called 16135.
And maybe I have misunderstood assigning "Sheet1" in place of
"ThisWorkBook".
As I say, all the procedures work when called and the txt file is
already open. It will add the procedure and do exactly as I want. Just
not upon opening.
And I mostly am trying to understand why.
Thank You all.
Scott