vba - Copying and Pasting Filtered Table Problems -
i have sub copies , pastes filtered table new worksheet, want copy cell values on only, not formulas.
sub pastefilteredtabletotempsheet(byref tempws worksheet, byref calcws worksheet) calcws.activate dim newtable listobject set newtable = calcws.listobjects("full_bearings_list") newtable.databodyrange.specialcells(xlcelltypevisible).copy _ destination:=tempws.range("a1") 'tempws.range("a1").pastespecial xlpastevalues 'application.cutcopymode = false end sub
the 2 lines commented out not want, copies cell values on new worksheet data not formatted table, destination syntax automatically formatted table formulas copied, not values only.
the link shows 2 examples. want format of left image table values, not formulas.
just paste twice.
tempws.range("a1").pastespecial xlpastevalues tempws.range("a1").pastespecial xlpasteformats
Comments
Post a Comment