G
gatarossi
Dear all,
I need to execute some code in worksheet_change then I did it:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$3" Then
Call return_accounting_code
End If
If Not Intersect(Target, Range("A7:A65536")) Is Nothing Then
Call return_accounting_code_description
End If
End Sub
But it doesn't work, I think here we have like a "circular reference",
because first I need to return only the accounting code (When I change
the cell B3 (that contains the profit center) excel returns from
access all accounting code for the profit center selected.
And after it, - of course, the column A - accounting code will change
- I need to run another VBA code to excel returns from access the
description of the new accountings codes.
How can I solve this circular reference?
I need first put the new accounting_code (until here, it's ok!), but
when I put the other procedure, excel doesn't understand it...
One important thing - I need to execute it in two parts!!! I known if
I put like above, it will run, but sometimes, I need to change only
the accounting code and not the profit center too!!!
If Target.Address = "$B$3" Then
Call retorna_conta_contabil
Call retorna_descricao_conta_contabil
End If
Thanks a lot !!!
I need to execute some code in worksheet_change then I did it:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$3" Then
Call return_accounting_code
End If
If Not Intersect(Target, Range("A7:A65536")) Is Nothing Then
Call return_accounting_code_description
End If
End Sub
But it doesn't work, I think here we have like a "circular reference",
because first I need to return only the accounting code (When I change
the cell B3 (that contains the profit center) excel returns from
access all accounting code for the profit center selected.
And after it, - of course, the column A - accounting code will change
- I need to run another VBA code to excel returns from access the
description of the new accountings codes.
How can I solve this circular reference?
I need first put the new accounting_code (until here, it's ok!), but
when I put the other procedure, excel doesn't understand it...
One important thing - I need to execute it in two parts!!! I known if
I put like above, it will run, but sometimes, I need to change only
the accounting code and not the profit center too!!!
If Target.Address = "$B$3" Then
Call retorna_conta_contabil
Call retorna_descricao_conta_contabil
End If
Thanks a lot !!!