ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   supress message (https://www.excelbanter.com/excel-programming/397249-supress-message.html)

geebee

supress message
 
hi,

i would like to know how i can supress te following message:

"do you want to replace the contents of the destination cells in Sheet1?"

i have DisplayAlerts = False in my code, but its not helping. i am not
sure what to do.

thanks in advance,
geebee


Don Guillett

supress message
 
Post your code


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"geebee" (noSPAMs) wrote in message
...
hi,

i would like to know how i can supress te following message:

"do you want to replace the contents of the destination cells in Sheet1?"

i have DisplayAlerts = False in my code, but its not helping. i am not
sure what to do.

thanks in advance,
geebee



geebee

supress message
 
basically it is when a pivot table includes or reflects more rows than it
currently reflects. no majic code here.



"Don Guillett" wrote:

Post your code


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"geebee" (noSPAMs) wrote in message
...
hi,

i would like to know how i can supress te following message:

"do you want to replace the contents of the destination cells in Sheet1?"

i have DisplayAlerts = False in my code, but its not helping. i am not
sure what to do.

thanks in advance,
geebee




cubbybear3

supress message
 
I am having the same/similar problem. I have a 'temporary' sheet that
I delete and re-load but do not want to see the caution/warning
message verifying the deletion. Here is the code I am using.

Sub RawData_Reset()

' delete & re-create the worksheet "RawData"
Sheets("RawData").Select
ActiveWindow.SelectedSheets.Delete

Sheets("DataBase").Select
ActiveWorkbook.Worksheets.Add.Name = "RawData"

End Sub



cubbybear3

supress message
 
Never mind. I found an older posting about "DisplayAlerts". My
problems was that I did not have "Application." in front of it.



Don Guillett

supress message
 
You may like this better but why are you doing this?

Sub RawData_Reset()
' delete & re-create the worksheet "RawData"
application.displayalerts=false
Sheets("RawData").Delete
application.displayalerts=true
Sheets("DataBase").Select 'WHY ???
ActiveWorkbook.Worksheets.Add.Name = "RawData"
End Sub



--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cubbybear3" wrote in message
ups.com...
I am having the same/similar problem. I have a 'temporary' sheet that
I delete and re-load but do not want to see the caution/warning
message verifying the deletion. Here is the code I am using.

Sub RawData_Reset()

' delete & re-create the worksheet "RawData"
Sheets("RawData").Select
ActiveWindow.SelectedSheets.Delete

Sheets("DataBase").Select
ActiveWorkbook.Worksheets.Add.Name = "RawData"

End Sub




cubbybear3

supress message
 
I did add the "application.displayalerts=false/true" statements.
just did not have them in the code when I did the cut/paste.

As for why the "Sheets("DataBase").Select", to make sure the
new worksheet is always in the same place (after the DATABASE
sheet).


Don Guillett

supress message
 

ActiveWorkbook.Worksheets.Add after:=Sheets("DataBase")
ActiveSheet.Name = "RawData"

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cubbybear3" wrote in message
oups.com...
I did add the "application.displayalerts=false/true" statements.
just did not have them in the code when I did the cut/paste.

As for why the "Sheets("DataBase").Select", to make sure the
new worksheet is always in the same place (after the DATABASE
sheet).



cubbybear3

supress message
 
Thanks Don. I like finding new ways to 'tighten up' my code. That is
why I frequent this newsgroup.
-pb


Don Guillett

supress message
 
Hope it helped


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cubbybear3" wrote in message
oups.com...
Thanks Don. I like finding new ways to 'tighten up' my code. That is
why I frequent this newsgroup.
-pb




All times are GMT +1. The time now is 10:13 AM.

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