ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Proper way to create new macro (https://www.excelbanter.com/excel-programming/414977-proper-way-create-new-macro.html)

Simon[_2_]

Proper way to create new macro
 
I hit record then immediate after I hit stop then, step in and type in
code.

When is the best way?

joel

Proper way to create new macro
 
I just type two lines

Sub Test

end Test

Most of the time I put the macros in Module sheets so I Have to use the VBA
menu to create the Module sheet Insert - Module. You can just type
macros into sheets and thisworkbook without inserting a module.

"Simon" wrote:

I hit record then immediate after I hit stop then, step in and type in
code.

When is the best way?


Simon[_2_]

Proper way to create new macro
 
On Aug 1, 12:16*pm, Joel wrote:
I just type two lines

Sub Test

end Test

Most of the time I put the macros in Module sheets so I Have to use the VBA
menu to create the Module sheet * * * *Insert - Module. *You can just type
macros into sheets and thisworkbook without inserting a module.



"Simon" wrote:
I hit record then immediate after I hit stop then, step in and type in
code.


When is the best way?- Hide quoted text -


- Show quoted text -


Hi Joel,

So in Excel you hit Alt F11 then click Insert Module?

Regards

Simon

joel

Proper way to create new macro
 
Yes, or go to worksheet menu Tools - Macro - Visual Basic Editor.

"Simon" wrote:

On Aug 1, 12:16 pm, Joel wrote:
I just type two lines

Sub Test

end Test

Most of the time I put the macros in Module sheets so I Have to use the VBA
menu to create the Module sheet Insert - Module. You can just type
macros into sheets and thisworkbook without inserting a module.



"Simon" wrote:
I hit record then immediate after I hit stop then, step in and type in
code.


When is the best way?- Hide quoted text -


- Show quoted text -


Hi Joel,

So in Excel you hit Alt F11 then click Insert Module?

Regards

Simon



All times are GMT +1. The time now is 02:23 PM.

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