excel - VBA Error "Cannot change part of a data table" -


i have code creates pivot tables populates workbook data. opens workbook acts template data, populates it, saves , closes. 8 times 8 different sets of data. i've run code many times before without issue , seemingly starts error out with: "cannot change part of data table" on second set of data (the first 1 works). section erroring out on is...

'transfers repairs data range("d27").select activecell.formular1c1 = _     "=vlookup(rc[-1],'[vba project.xlsm]repairs pivot'!r5c8:r60c11,4,false)" selection.autofill destination:=range("d27:d30"), type:=xlfilldefault range("d27:d30").select range("d85").select activecell.formular1c1 = _     "=vlookup(rc[-1],'[vba project.xlsm]repairs pivot'!r5c8:r60c11,4,false)" 

any idea whats causing this?

not answer improvement you.

'transfers repairs data range("d27:d30").formular1c1 = _     "=vlookup(rc[-1],'[vba project.xlsm]repairs pivot'!r5c8:r60c11,4,false)" range("d85").formular1c1 = _     "=vlookup(rc[-1],'[vba project.xlsm]repairs pivot'!r5c8:r60c11,4,false)" 

also sure you're on right sheet , others commented there's no data table you're trying paste these formulas. use particular sheet can alter above:

sheets("sheet1").range("d27:d30").formular1c1 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -