The error statement says “Unable to get the AutoFill property of the Range class”. However, AutoFill property is indeed in Range Class, as I checked. Does anyone know how to resolve this error?
I have tried search in google, and there’s no approperiate answer to this. Also I have tried convert the code in VBA, and it works fine in VB.
using Microsoft.Office.Interop.Excel;
Application.Range["H2"].Select();
Selection.AutoFill(Destination: mdlAMain.xlApp.Range["H2", "H" + myRow],
Type: XlAutoFillType.xlFillDefault);
How big is your range? These folks had issues with >65K items. Excel AutoFill problem
A guy over here ( http://www.excelforum.com/excel-programming/734596-auto-fill-column-in-a-table.html ) mentions using what would amount to “myRow = ActiveSheet.UsedRange.Rows.Count”. That sounds like it’s a count of rows rather than an absolute cell location.
Wish I could help more. I’d stick with the “AutoFill method of Range class failed” and google the heck out of that.