Thread: Display Alert
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Display Alert

Hi Frank,

See posts from Jon Peltier and Tushar Mehta at:

http://tinyurl.com/aztzu


---
Regards,
Norman



"FrankJIN" wrote in message
...

Thanks Norman.

My code:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Application.DisplayAlerts = False
MsgBox "Range " & Target.Address & " was changed"
End Sub

That means if I input any value or modify the value of cell, any error
message could be surpressed. But if I have chart with logarithmic scale,
when
I input "0" or "negative value" in the source data. The excel will still
pop
up an alert message: " Negative or zero values cannot be plotted correctly
on
log charts...."

The method of
Application.DisplayAlerts = False
can work for some cases, but some cases, like here, it can't be triggered
properly.

Do you have any idea to surpress the " Negative or zero values cannot be
plotted correctly on log charts...." effectively?

Thanks
Frank




"Norman Jones" wrote:

Hi Frank,

The excel will set Application.DisplayAlerts to "true" as default as
the
macro running was done.

Is it possible to set this default value as "false"?


I think that you will need to set DisplayAlerts to False wherever you
need
to do so. The setting is not persistent.

---
Regards,
Norman



"FrankJIN" wrote in message
...
The excel will set Application.DisplayAlerts to "true" as default as
the
macro running was done.

Is it possible to set this default value as "false"?

Thanks.