I have an excel template uses MSXML3.dll. So to use my template user must have installed MSXML3 before. I want to throw a proper message when MSXML3 is not installed in the machine. Right now when i start running the macro it shows the code and shows MSXML3 object not defined.(I guess it comiles the code whenever it is run.) I tried the following code. Still doesnt work.
......
strfilename = Dir$("C:\WINNT\system32\msxml3.dll"
If strfilename = "" Then
MsgBox "MS XML components are not installed properly on your machine.", vbCritical
Application.DisplayAlerts = False
Application.Quit
Exit Sub
End If
.......
......
strfilename = Dir$("C:\WINNT\system32\msxml3.dll"
If strfilename = "" Then
MsgBox "MS XML components are not installed properly on your machine.", vbCritical
Application.DisplayAlerts = False
Application.Quit
Exit Sub
End If
.......