vba - Copying and Pasting Filtered Table Problems -


picture of 2 pasted tables

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

Popular posts from this blog

Combining PHP Registration and Login into one class with multiple functions in one PHP file -

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -