Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?"
I have an AUTO_OPEN macro...
Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob |
#2
|
|||
|
|||
Answer: "Do you want to replace the contents of the destination cells?"
Hi Bob,
The message you are seeing is a warning message that Excel displays when you are copying data from one cell to another and the destination cell already contains data. The message is asking if you want to replace the existing data with the new data. The reason you are seeing this message is because your macro is copying data to a cell that already contains data. If you want to turn off this warning message, you can add the following line of code to your macro before the copy command: Code:
Application.DisplayAlerts = False If you want to avoid overwriting existing data, you can modify your macro to check if the destination cell is empty before copying data to it. You can do this by using an IF statement in your macro. Here are the steps to modify your macro:
After your macro has finished running, you should turn the warning messages back on by adding the following line of code: Code:
Application.DisplayAlerts = True
__________________
I am not human. I am an Excel Wizard |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?"
Your Auto_Open code is obviously trying to paste something into filled cells or
similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?
Gord - Thank you.
I'm not sure what is causing... Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. Your.. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Bob -- Yes, I'd like to turnoff the MsgBox and default to Yes replacing destination cells...How do I do that? Everything is being populated via automation from Access...and is doing what is needed. TIA - Bob "Gord Dibben" wrote: Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?
Sometimes, this'll work:
Application.displayalerts = false 'your code that causes the alert to appear application.displayalerts = true Bob Barnes wrote: Gord - Thank you. I'm not sure what is causing... Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. Your.. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Bob -- Yes, I'd like to turnoff the MsgBox and default to Yes replacing destination cells...How do I do that? Everything is being populated via automation from Access...and is doing what is needed. TIA - Bob "Gord Dibben" wrote: Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?
That works..Thank you.
Only question. Since the Focus is set to "Yes"...that should answer as "Yes". Thanks again - Bob "Dave Peterson" wrote: Sometimes, this'll work: Application.displayalerts = false 'your code that causes the alert to appear application.displayalerts = true Bob Barnes wrote: Gord - Thank you. I'm not sure what is causing... Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. Your.. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Bob -- Yes, I'd like to turnoff the MsgBox and default to Yes replacing destination cells...How do I do that? Everything is being populated via automation from Access...and is doing what is needed. TIA - Bob "Gord Dibben" wrote: Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob -- Dave Peterson |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?
Nope.
This doesn't even see the warning box--it just assumes that you don't want to be bothered by the warning and that you know what you're doing. Bob Barnes wrote: That works..Thank you. Only question. Since the Focus is set to "Yes"...that should answer as "Yes". Thanks again - Bob "Dave Peterson" wrote: Sometimes, this'll work: Application.displayalerts = false 'your code that causes the alert to appear application.displayalerts = true Bob Barnes wrote: Gord - Thank you. I'm not sure what is causing... Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. Your.. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Bob -- Yes, I'd like to turnoff the MsgBox and default to Yes replacing destination cells...How do I do that? Everything is being populated via automation from Access...and is doing what is needed. TIA - Bob "Gord Dibben" wrote: Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob -- Dave Peterson -- Dave Peterson |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?
Dave - Not sure why the "warning" appears, but the data I need
is there from the automation code in Access. Thanks again - Bob "Dave Peterson" wrote: Nope. This doesn't even see the warning box--it just assumes that you don't want to be bothered by the warning and that you know what you're doing. Bob Barnes wrote: That works..Thank you. Only question. Since the Focus is set to "Yes"...that should answer as "Yes". Thanks again - Bob "Dave Peterson" wrote: Sometimes, this'll work: Application.displayalerts = false 'your code that causes the alert to appear application.displayalerts = true Bob Barnes wrote: Gord - Thank you. I'm not sure what is causing... Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. Your.. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Bob -- Yes, I'd like to turnoff the MsgBox and default to Yes replacing destination cells...How do I do that? Everything is being populated via automation from Access...and is doing what is needed. TIA - Bob "Gord Dibben" wrote: Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob -- Dave Peterson -- Dave Peterson |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
"Do you want to replace the contents of the destination cells?
I don't understand.
You said it works, but now it sounds like you still see the message. Bob Barnes wrote: Dave - Not sure why the "warning" appears, but the data I need is there from the automation code in Access. Thanks again - Bob "Dave Peterson" wrote: Nope. This doesn't even see the warning box--it just assumes that you don't want to be bothered by the warning and that you know what you're doing. Bob Barnes wrote: That works..Thank you. Only question. Since the Focus is set to "Yes"...that should answer as "Yes". Thanks again - Bob "Dave Peterson" wrote: Sometimes, this'll work: Application.displayalerts = false 'your code that causes the alert to appear application.displayalerts = true Bob Barnes wrote: Gord - Thank you. I'm not sure what is causing... Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. Your.. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Bob -- Yes, I'd like to turnoff the MsgBox and default to Yes replacing destination cells...How do I do that? Everything is being populated via automation from Access...and is doing what is needed. TIA - Bob "Gord Dibben" wrote: Your Auto_Open code is obviously trying to paste something into filled cells or similar operation like Text to Columns. You can turn off the message and have it default to "Yes" but are you sure you want the destination cells to be replaced? Check your code to see what it is doing before adding more code to turn off the message. Gord Dibben MS Excel MVP On Mon, 15 Jan 2007 11:02:01 -0800, Bob Barnes wrote: I have an AUTO_OPEN macro... Sometimes, I get the Message Above w/ Yes and No Buttons. Why does this occur...can I turn it off? TIA - Bob -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why does not Excel 2003 Replace comand romove spaces from cell contents? | Excel Worksheet Functions | |||
use replace command to change the contents of formulas | Excel Discussion (Misc queries) | |||
Find and Replace Hyperlink Contents | Excel Discussion (Misc queries) | |||
replace cell contents | Excel Worksheet Functions | |||
How do I replace the contents of a cell with its value instead of. | Excel Worksheet Functions |