Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel Programming

LinkBack Thread Tools Display Modes
Old 04-14-2019, 05:40 PM
debes7 debes7 is offline Windows 10 Office 2007
Join Date: Mar 2019
Posts: 4
debes7 is on a distinguished road
Default Add a button to add a line

Hi, I would like to create a button that would add a new line in my form and at the same time pushing the other lines down one .
That would serve for anybody not to familiar with the program to add new info by just clicking on the button and filling the info on the line.
Thanks very much for the help.
Reply With Quote
Old 04-15-2019, 10:25 AM
Logit Logit is offline Windows 10 Office 2007
Competent Performer
Join Date: Jan 2017
Posts: 244
Logit is on a distinguished road

Sub insertrows()
    ActiveCell.EntireRow.Offset(1).Resize(1).Insert Shift:=xlDown
End Sub
The above will add a blank line below the cell that is selected.

If you click on A7, then run the above macro, the new line will be added
on A8.
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a "Font color" button and a "Highlight text" button in the Quick Launch toolbar ? gloub Word 12 02-19-2019 03:19 PM
Usability of space between final line of body text and footnote separator line Swarup Word 6 07-28-2018 12:51 PM
How to change the default features for AutoShape horizontal line (button 'Insert horizontal line') 534tomasz Word 6 10-13-2016 02:33 AM
how can I cut and paste a line in page1 to page 2 by clicking a button? esco Excel 11 12-10-2013 10:48 AM
How to run two button macros with one button? Geza59 Excel Programming 1 02-14-2013 12:11 AM

All times are GMT -7. The time now is 10:04 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc. is not affiliated with Microsoft