I have an Excel file that has a bunch of VBA and macro code in it. When I open the file in Excel I can choose not to \'enable\' them - so the values in the fields all stay as t
Is ADO any use to you? I can only give a script example, i'm afraid.
strLinkFile = "C:\Docs\LTD.xls"
Set cn = CreateObject("ADODB.Connection")
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strLinkFile & ";" & _
"Extended Properties=""Excel 8.0;HDR=YES;"""
Set rs = CreateObject("ADODB.Recordset")
rs.Open "Select * from [Sheet1$A1:B5]", cn, adOpenStatic
Application.AutomationSecurity = msoAutomationSecurity.msoAutomationSecurityForceDisable
Try opening the workbook after this statement. I think, this will disable macros at Application Level (not at workbook level)
Hope that helps.