Hi guys,
We have a problem thats had all the devs in our office scratching our heads. This is particular to office 16/ windows 10 and can only be replicated with certain combinations of excel files, computers and users.
The issue is that for some users on some machines when running a report they are getting:
"Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook."
The same user on different machine works.
A different user on the same machine works.
Here is the relevent code:
Dim wbTemplate As Excel.Workbook, wbData As Excel.Workbook, wsData As Excel.Worksheet
Set wbTemplate = Application.ActiveWorkbook
Set wbData = Application.Workbooks.Add
Application.DisplayAlerts = False
wbTemplate.Sheets(Array("Summary", "Detail")).Copy before:=wbData.Sheets(1)
The error throws on the last line of code above. Any ideas?
Thanks very much
~TheShoe
Bookmarks