excel - Calling sub with 2 parameters defined -


i trying call sub in main , fill column sub. getting syntax error. why this?

option explicit  private sub form_load()     dim mystring string, long, asciinum string, f long      worksheets("sheet1")         f = 2 .cells(.rows.count, "i").end(xlup).row             mystring = .cells(f, "i").value2             prueba1 (mystring, f)         next f     end end sub  sub prueba1(mystring, index long) dim long, asciinum string              = 1 len(mystring)                 asciinum = lcase(mid(mystring, i, 1))                 if asciinum "[aeiou]"                     .cells(index, "m") = "first vowel " + asciinum                     exit                 end if             next end sub 

  • prueba1 (mystring, f) should prueba1 mystring, f
  • prueba1(mystring, index long) should prueba1(mystring string, index long)
  • there no parent worksheet in ... end in prueba1 using .cells instead of cells. @ minimum, should worksheets("sheet1").cells(index, "m") = "first vowel " + asciinum

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -