vba - how can i resolve an object required error -


i'm working on macro helps me copy data 1 worksheet in excel on conditions. tried following code got object required error

any appreciated

sub copier()    dim ws1 worksheet, ws2 worksheet, src range, dest range, integer     set ws1 = worksheets("workload - charge de travail")    set ws2 = worksheets("sheet1")     = 2 ws1.range("a1").specialcells(xllastcell).row                 set src = ws1.range("a" & & ":al" & + 50)        set dest = ws2.range("a" & & ":al" & + 50)          if source.cells(i, 31).value = "completed - appointment made / complété - nomination faite"            '(i,31)  drop down list's condition             src.copy destination:=dest           dest.value = dest.value        end if    next end sub 

salut, veuyer verifier que "source", should not sheet "src".

i'm guessing you're trying copy 1 row @ time,

  • range("a" & & ":al" & i) "a2:al2" rather than
  • range("a" & & ":al" & + 50) "a2:al52"

also check cells(y,31) intended "ae", before al (column 38).


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -