ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel Sheet (https://www.excelbanter.com/excel-discussion-misc-queries/259903-excel-sheet.html)

Christina

Excel Sheet
 
Good morning,

Need help with:

Code to delete all rows in Column A below active cell
Turn off warnings in a macro, specifically I am copying a spreadsheet to a
new one, and close original, don't want pop up box to ask if file needs to be
saved etc.

Thanks


Cristina

Luke M[_4_]

Excel Sheet
 
Sub DeleteRows()
Application.DisplayAlerts = False
Range(ActiveCell.Offset(1, 0), "A65536").EntireRow.Delete
Application.DisplayAlerts = True
End Sub

--
Best Regards,

Luke M
"Christina" wrote in message
...
Good morning,

Need help with:

Code to delete all rows in Column A below active cell
Turn off warnings in a macro, specifically I am copying a spreadsheet to a
new one, and close original, don't want pop up box to ask if file needs to
be
saved etc.

Thanks


Cristina




Christina

Excel Sheet
 
Thanks very much for your help. Is it possible to turn off promts in Excel,
eg when copying from one sheet to next and closing....do you want to close
etc?

Thanks

"Luke M" wrote:

Sub DeleteRows()
Application.DisplayAlerts = False
Range(ActiveCell.Offset(1, 0), "A65536").EntireRow.Delete
Application.DisplayAlerts = True
End Sub

--
Best Regards,

Luke M
"Christina" wrote in message
...
Good morning,

Need help with:

Code to delete all rows in Column A below active cell
Turn off warnings in a macro, specifically I am copying a spreadsheet to a
new one, and close original, don't want pop up box to ask if file needs to
be
saved etc.

Thanks


Cristina



.


Christina

Excel Sheet
 
I tested it and it works, except it still prompts me to save etc. ANy other
ideas?


Thanks

"Luke M" wrote:

Sub DeleteRows()
Application.DisplayAlerts = False
Range(ActiveCell.Offset(1, 0), "A65536").EntireRow.Delete
Application.DisplayAlerts = True
End Sub

--
Best Regards,

Luke M
"Christina" wrote in message
...
Good morning,

Need help with:

Code to delete all rows in Column A below active cell
Turn off warnings in a macro, specifically I am copying a spreadsheet to a
new one, and close original, don't want pop up box to ask if file needs to
be
saved etc.

Thanks


Cristina



.


Christina

Excel Sheet
 
Sorry, thanks very much. Code was copied too high in macro dialog box.
Thanks again.

"Luke M" wrote:

Sub DeleteRows()
Application.DisplayAlerts = False
Range(ActiveCell.Offset(1, 0), "A65536").EntireRow.Delete
Application.DisplayAlerts = True
End Sub

--
Best Regards,

Luke M
"Christina" wrote in message
...
Good morning,

Need help with:

Code to delete all rows in Column A below active cell
Turn off warnings in a macro, specifically I am copying a spreadsheet to a
new one, and close original, don't want pop up box to ask if file needs to
be
saved etc.

Thanks


Cristina



.



All times are GMT +1. The time now is 10:21 PM.

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