ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2 macros to insert new line (https://www.excelbanter.com/excel-programming/382010-2-macros-insert-new-line.html)

davegb

2 macros to insert new line
 
I have 2 spreadsheets I use nearly every day. In both, I've written a
macro to insert a new blank line that I fill in, and the new line is
formatted appropriately for that worksheet. I'd like to be able to use
the same shortcut to access each macro. Is there any way to have the
macro in the activesheet run when Cntrl i is pressed, not the macro in
the other worksheet, which is often open at the time. Or do I have to
have different shortcuts in each workbook? Or would one common macro in
my Personal workbook that checks the activesheet name and then inserts
the new line appropriate to that sheet be the easiest way to make this
happen?

Thanks!


Gary Brown

2 macros to insert new line
 
Put it in your Personal.xls
--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of the
post.



"davegb" wrote:

I have 2 spreadsheets I use nearly every day. In both, I've written a
macro to insert a new blank line that I fill in, and the new line is
formatted appropriately for that worksheet. I'd like to be able to use
the same shortcut to access each macro. Is there any way to have the
macro in the activesheet run when Cntrl i is pressed, not the macro in
the other worksheet, which is often open at the time. Or do I have to
have different shortcuts in each workbook? Or would one common macro in
my Personal workbook that checks the activesheet name and then inserts
the new line appropriate to that sheet be the easiest way to make this
happen?

Thanks!




All times are GMT +1. The time now is 10:04 AM.

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