excel - PasteSpecial method on range fails -


i'm trying paste range of cells in worksheet. have come far:

for = 1 mycount      wbk.activate      set criteria = sheets(igmsheet).cells(i, 1)       sheets(igmsheet).range(cells(i, 2), cells(i, 4)).copy 'this copies 3 cells need      w.activate     if activesheet.autofiltermode activesheet.showalldata 'remove autofilter      selection.autofilter      range("$a$1:$bm$204").autofilter field:=2, criteria1:=criteria.value      range("$bc$1:$be$204").specialcells(xlcelltypevisible).pastespecial   next 

if update value in range works, pasting cells not.

kindly advice.

further comment above, try this...

dim rng range  = 1 mycount     wbk.activate     set criteria = sheets(igmsheet).cells(i, 1)      set rng = sheets(igmsheet).range(cells(i, 2), cells(i, 4))      w.activate     if activesheet.autofiltermode activesheet.showalldata 'remove autofilter      selection.autofilter      range("$a$1:$bm$204").autofilter field:=2, criteria1:=criteria.value      rng.copy      range("$bc$1:$be$204").specialcells(xlcelltypevisible).pastespecial next 

there few other things noticed. example using .activate , unqualified cells range(cells(i, 2), cells(i, 4))

you might want see this


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -