1004 Global Error - Excel VBA -
my code doesn't work. want a2 + 1 = a3
in macros, when tried using p integer, gives me 1004 global error
. how (n,1) a2 + 1 = a3
in excel vba?
sub agregarproducto() range("a7:g7").select range("g7").activate selection.copy dim p integer p = 0 p = range("a2:a50").count p = p + 1 range(p, 1).select selection.pastespecial paste:=xlpastevaluesandnumberformats, operation:= _ xlnone, skipblanks:=false, transpose:=false range("e2:e3").select activecell.formular1c1 = "0" range("l11").select activecell.formular1c1 = "1" end sub
change
range(p, 1).select
to
cells(p, 1).select