i can't figure out how to copy cells value(even by merged cells) between different workbook without use .activate. I know how to avoid select: dim x as range dim wrk1 as workbook dim wrk2 as workbook dim w as range dim r as range dim e as range 'etc...
but i can't copy ranges without using .activate .. Id like to get something working like:
sub avoid()
dim x as range
dim wrk1 as workbook
dim wrk2 as workbook
dim w as range
dim r as range
dim e as range
set wrk1 = application.workbook("cartel1") 'already open workbook
set wrk2 = workbook.open("workB") 'workbook was closed
set x = wrk1.range("a1")
set e = wrk1.range("a3")
set w = wrk2.range("a1")
set r = wrk2.range("a2")
x.copy(w)
e.copy(r)
end sub
but it doesn't work. Any help? thanks