ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Activate macro1 (https://www.excelbanter.com/excel-programming/295383-activate-macro1.html)

IRMA MENDOSA

Activate macro1
 


I Have this template the fills up a deposit slip and the only thing that i have to do is fill up the amount in cell S7 and then press enter to go to cell S8

Is there a way to activate macro1
when i hit enter to go to next cell wich is S8

Thanks in advance


Vasant Nanavati

Activate macro1
 
Not exactly, but you can trigger a macro any time you go to cell S8 (either
via mouse or keyboard) using the Worksheet_SelectionChange event.

Put the following code in the sheet module:

Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$S$8" Then Macro1
End Sub

Macro1 should be in a standard module and not designated as Private.

--

Vasant

"IRMA MENDOSA" wrote in message
...


I Have this template the fills up a deposit slip and the only thing that i
have to do is fill up the amount in cell S7 and then press enter to go to
cell S8

Is there a way to activate macro1
when i hit enter to go to next cell wich is S8

Thanks in advance



Bob Phillips[_6_]

Activate macro1
 
You can get Excel to do this for you.

Go to ToolsOptionsEdit and check the Move selection after Enter box, and
choose your direction.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
Not exactly, but you can trigger a macro any time you go to cell S8

(either
via mouse or keyboard) using the Worksheet_SelectionChange event.

Put the following code in the sheet module:

Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$S$8" Then Macro1
End Sub

Macro1 should be in a standard module and not designated as Private.

--

Vasant

"IRMA MENDOSA" wrote in message
...


I Have this template the fills up a deposit slip and the only thing that i
have to do is fill up the amount in cell S7 and then press enter to go to
cell S8

Is there a way to activate macro1
when i hit enter to go to next cell wich is S8

Thanks in advance






All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com