Hi guys,
I need your help! For a project I try to create a "database" (worksheet) where data gets imported and can be updated.
After the import of the data (query) I track the changes with the worksheet_change event followed by a function to throw the corresponding row number.
The idea is to pass the single row numbers to a dynamic array and then loop through the array to copy the affected rows to another sheet (like an archive).
How can I pass the row numbers to an array and where should I create the array to make sure it's "empty" after data import?
Any help is very much appreciated!
Nika
I need your help! For a project I try to create a "database" (worksheet) where data gets imported and can be updated.
After the import of the data (query) I track the changes with the worksheet_change event followed by a function to throw the corresponding row number.
VBA Code:
'track cells which have changes
Public Sub Worksheet_Change(ByVal target As Range)
'give range of changed cells
Debug.Print "Something changed in cell " & target.Address(0, 0)
Call target4changes(target)
Code:
Public Function target4changes(target As Range)
MsgBox target.Address
End Function
The idea is to pass the single row numbers to a dynamic array and then loop through the array to copy the affected rows to another sheet (like an archive).
How can I pass the row numbers to an array and where should I create the array to make sure it's "empty" after data import?
Any help is very much appreciated!
Nika