ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   supressing a message in vba (https://www.excelbanter.com/excel-programming/331510-supressing-message-vba.html)

Rob Hargreaves[_2_]

supressing a message in vba
 
Hi



I have a button to export and cut rows to another spreadsheet. Excel promts
me on moving the rows that I have named ranges on the sourcesheet with the
same names as on the destination sheet. Would I like to keep the names the
same or change them?



I always want to keep the named ranges the same so that the rows when added
will work the same as they will contain the same data in the named ranges.



Can someone tell me how to stop the messages?



Thanks

Rob




Chip Pearson

supressing a message in vba
 
Try

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Rob Hargreaves" wrote in message
...
Hi



I have a button to export and cut rows to another spreadsheet.
Excel promts me on moving the rows that I have named ranges on
the sourcesheet with the same names as on the destination
sheet. Would I like to keep the names the same or change them?



I always want to keep the named ranges the same so that the
rows when added will work the same as they will contain the
same data in the named ranges.



Can someone tell me how to stop the messages?



Thanks

Rob






Rob Hargreaves[_2_]

supressing a message in vba
 
Thanks Chip thats a great help

"Chip Pearson" wrote in message
...
Try

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Rob Hargreaves" wrote in message
...
Hi



I have a button to export and cut rows to another spreadsheet. Excel
promts me on moving the rows that I have named ranges on the sourcesheet
with the same names as on the destination sheet. Would I like to keep
the names the same or change them?



I always want to keep the named ranges the same so that the rows when
added will work the same as they will contain the same data in the named
ranges.



Can someone tell me how to stop the messages?



Thanks

Rob











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

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