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 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo