header image
 

Archive for the 'Excel/VBA' Category

Method ‘CopyFromRecordset’ of object ‘Range’ failed

• 4 July 2011

If you get the error – Method ‘CopyFromRecordset’ of object ‘Range’ failed Do what this guy says http://www.ozgrid.com/forum/showthread.php?t=32105&page=1 [vba] Dim i as Long i = 1 For Each fld In rst.Fields ‘ Print out column names wsSheet.Cells(2, i).Value = fld.Name i = i + 1 Next fld Dim j As Long, k As Long With […]