The intention is that when you click on the Euro Synths tab, the macro impute the "L" character in cell D1 of the Local Synthesis tab and then return to the Euro Overview tab. I was able to solve the error problem by allocating the macro in the module. So I just entered a command on the Euro Synth page to call the macro:
Then on the Euro Overview page I inserted the code:
Private Sub Worksheet_Activate()
Call Module1.Macro1
End Sub
In the Module insert the macro code
Sub Macro1()
Sheets("SINTESE_LOCAL").Select
Range("D1").Select
ActiveCell.FormulaR1C1 = "L"
Sheets("SINTESE_EURO").Select
End Sub
The problem is that since I used the command Private Sub Worksheet_Activate()
, it understands that all the ways to access the tab can trigger the macro, and as I put the command Sheets("SINTESE_EURO").Select
, in Macro it ends up in looping.
Is there a function that activates only when I click on the tab and not in all ways to access it, such as Private Sub Worksheet_Activate()
?
And this is the error line:
Range("D1").Select
Thank you, people.