ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert New Row on Sheet Not in Focus (https://www.excelbanter.com/excel-programming/382446-insert-new-row-sheet-not-focus.html)

Bull

Insert New Row on Sheet Not in Focus
 
Is there a code that I can assign to a command button located in sheet
1 that inserts a new row in sheet 3-without activating sheet 3
(putting it in focus)??


Martin Fishlock

Insert New Row on Sheet Not in Focus
 
Hi Bull:

worksheets("sheet 3").rows(insert row number here).insert
or
worksheets("sheet 3").range("C5").entirerow.insert

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Bull" wrote:

Is there a code that I can assign to a command button located in sheet
1 that inserts a new row in sheet 3-without activating sheet 3
(putting it in focus)??




All times are GMT +1. The time now is 11:26 AM.

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