excel vba - Application defined Error while assigning a value to a cell -



excel vba - Application defined Error while assigning a value to a cell -

sub apnumbers() dim i, strnglen, lastcell integer dim ws worksheet dim currentcell range set ws = activeworkbook.sheets(2) lastcell = range("ax1048556").end(xlup).row = 4 lastcell set currentcell = activesheet.range("ba" & i) pacn= currentcell.value pnoposition = instr(1, pacn, "1") pvalue = mid(pacn, pnoposition, 8) ws .range("ay" & i).value = pvalue end end sub

here on 3rd lastly line getting application defined or object defined error. can u help?

excel-vba

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -