Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a row
Hi,
I was wondering if anyone could provide me with a function for a command button that when clicked, will prompt the user for the row number they want to delete and then delete it for them. Or if this is not possible, something similar would also be great!! Thanks for your help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a row
Rhonda,
Use code like the following: Dim RowNdx As Long RowNdx = Application.InputBox(prompt:="Enter a row number", Type:=1) If RowNdx 0 And RowNdx <= Rows.Count Then Rows(RowNdx).Delete End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Rhonda" wrote in message ... Hi, I was wondering if anyone could provide me with a function for a command button that when clicked, will prompt the user for the row number they want to delete and then delete it for them. Or if this is not possible, something similar would also be great!! Thanks for your help! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a row
Thank you very much!!! That's great!!
-----Original Message----- Rhonda, Use code like the following: Dim RowNdx As Long RowNdx = Application.InputBox(prompt:="Enter a row number", Type:=1) If RowNdx 0 And RowNdx <= Rows.Count Then Rows(RowNdx).Delete End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Rhonda" wrote in message ... Hi, I was wondering if anyone could provide me with a function for a command button that when clicked, will prompt the user for the row number they want to delete and then delete it for them. Or if this is not possible, something similar would also be great!! Thanks for your help! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I delete a macro when the Delete button is not active? | Excel Worksheet Functions | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
How do i delete a macro in Excel 2003 when delete isn't highlight | Excel Discussion (Misc queries) | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions |