I've written an Access 2007 application that opens an empty Excel spreadsheet and writes into it with the following (shortened) VBA code:
Dim Excel_App As Excel.Application
Set Excel_App = CreateObject("Excel.Application")
Excel_App.Visible = True
Excel_App.Workbooks.Add
With Excel_App
.Columns("A:ZZ").ColumnWidth = 25
.Range("A2:ZZ2").VerticalAlignment = xlCenter
.Range("A2:ZZ2").Font.FontStyle = "Bold"
.Range("A" & CStr(iHeadingRows)).Select
.ActiveCell.FormulaR1C1 = "ABC"
End With
The above code works on all installations of Windows (Vista|Xp)/Access 2007 (updated with all patches) I've tested but the customer's one. On his one, the empty Excel spreadsheet gets opened but remains empty when I try to write into it and a runtime error is generated.
Is it possible some system policy for the user or some particular setup is blocking the normal behaviour I've tested on the other PCs? And if that's the case, what can be done to fix it in the most unobtrusive way?
Thanks for any advice!