I have an access database which produces monthly management reports by creating an Excel Workbook from Access using VBA. This has been running hunky dory every month for years. Now all of a sudden I am getting the Error:
The standard VBA error code: 1004
The standard VBA error description: No such interface supported
The error occurs when I attempt to merge some cells on line 2730 below:
Debug.Print has been added to resolve the values of the variables and this translates to:
If I comment out line 2730 the routine runs fine and produces the required workbook, but naturally the cells I wanted merging don't merge.
I am at a loss as to why this is happening all of a sudden and hence equally at a loss as to how to correct it.
Any help appreciated.
The standard VBA error code: 1004
The standard VBA error description: No such interface supported
The error occurs when I attempt to merge some cells on line 2730 below:
Code:
2720 If intColumnCounter < 16 Or intColumnCounter > 19 Then
2725 Debug.Print "wsht.Range(Cells(" & intRangeR1 & ", " & intRangeC1 & "), Cells(" & intRangeR2 & ", " & intRangeC2 & ")).Merge"
2730 wsht.Range(Cells(intRangeR1, intRangeC1), Cells(intRangeR2, intRangeC2)).Merge
2740 End If
Debug.Print has been added to resolve the values of the variables and this translates to:
Code:
wsht.Range(Cells(8, 1), Cells(10, 1)).Merge
If I comment out line 2730 the routine runs fine and produces the required workbook, but naturally the cells I wanted merging don't merge.
I am at a loss as to why this is happening all of a sudden and hence equally at a loss as to how to correct it.
Any help appreciated.