Question : Excel disable error checking via automation

Hi.

I'm outputting some numbers from a VB6 program to Excel using Automation.  I want the numbers to be treated as text but I don't want the blooming little green triangle telling me "The number in this cell is formatted as text"!  Range(blah, blah).NumberFormat = "@" doesn't seem to work.
I think I really need to know:
Is there any way of disabling Background Error Checking (Tools/Options/Error Checking) via Automation.

TIA.

Answer : Excel disable error checking via automation

Yes you can...

Use the following command -

Application.ErrorCheckingOptions.BackgroundChecking = False

See macro below.

1:
2:
3:
Sub Macro1()
    Application.ErrorCheckingOptions.BackgroundChecking = False
End Sub
Open in New Window Select All
Random Solutions  
 
programming4us programming4us