Forum Discussion
Nishkarsh31
Aug 23, 2022Brass Contributor
Can VBA Event "Change" work if the target address cell is a formula that changes dynamically?
I have data coming in from different sheets using vstack and a target cell, which caluclates the total vstack rows using ROWS(A2#) On "Today" sheet, I have some manual entires, I want to clear th...
- Aug 23, 2022
I wouldn't count myself as a VBA expert either!
What I have tried is to move the event handler to the 'Gallons' Sheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Worksheets("Gallons").ListObjects("Table1").Range) Is Nothing Then ClearManualInput End Sub
and placed the instruction to clear contents in a general code module
Sub ClearManualInput() Range("ManualEntries").ClearContents End Sub
I hope this at least represents a step in the right direction.
Nishkarsh31
Aug 23, 2022Brass Contributor
I understand, and I was exploring the declarations about the TableUpdate as well.
In my original file, the gallon and sample are indeed tables, but with a lot of columns, but there's so much happening in every column of those.
Can you help me a TableUpdate macro, in my sample file, so that I can try replicating it?
My VBA knowledge is just surface level.
In my original file, the gallon and sample are indeed tables, but with a lot of columns, but there's so much happening in every column of those.
Can you help me a TableUpdate macro, in my sample file, so that I can try replicating it?
My VBA knowledge is just surface level.
PeterBartholomew1
Aug 23, 2022Silver Contributor
I wouldn't count myself as a VBA expert either!
What I have tried is to move the event handler to the 'Gallons' Sheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Worksheets("Gallons").ListObjects("Table1").Range) Is Nothing Then ClearManualInput
End Sub
and placed the instruction to clear contents in a general code module
Sub ClearManualInput()
Range("ManualEntries").ClearContents
End Sub
I hope this at least represents a step in the right direction.
- Nishkarsh31Aug 29, 2022Brass ContributorThank you sir, this was really helpful