I have a function that brings up the generic warning when merging two fields together.
I want to suppress this message using vba. However after looking on the forums, I found that "Application.DisplayAlerts = True" should do the trick. However when I try to apply the code there is no option for Application. then display alerts.
Do i have to import a specific library reference for this? I currently have Excel 14.0 imported..
1 Answer
I found the resolution myself.
Because Application.DisplayAlerts = False was to set the access program that was calling on my create excel object to ignore any alerts displayed by access. So to solve it I simply wrote objExcel.DisplayAlerts = false
4 Comments
Felipe
I am dealing with the same problem but, unfortunately, I was not able to understand your solution. Could you provide more details?
Chrislaar123
Basically I was using application.displayalerts = false, hoping that it would suppress warnings when doing stuff within an excel workbook when what you actually need to do is just use the instance name of the excel application declaration you're using rather than application.
Felipe
And how do you declare and set the variable objexcel?
Chrislaar123
Dim objExcel As New Excel.Application
Application.DisplayAlerts = Truein your code? Do you get a compile error when compiling?Application.DisplayAlerts = False. Can you post the part of code which does not compile?