Tengo problemas con VbScript me sale error cuándo pruebo los ejem.

estoy intentando aprender vbscript pero cuando testeo los ejemplos 

me tira error un ejemplo es: 

option explicit
private sub cmdint_edad_click()
dim i as interger, edad as byte, le as byte, e2 as byte, e3 as byte

dim prom as single, sumaedad as interger

sumaedad = 0
for i=1 to 50 do
    edad = inputbox("edad" & i)
    sumaedad = sumaedad + edad
    if edad < 30 then
     el = el +1
   else
     if edad <= 50 then
       e2 = e2 +1
  else
       e3 = e3 +1
  end if
 next i
prom = sumaedad / 5
txtpromedio.text = prom
txtmenos_30.text = el
txtentre30_50.text = e2
txtmas_50.text = e3

end sub

los pruebo en block de notas  

cuando lo ejecuto me tira error  linea 3, carácter 7, error;    se  esperaba un final de la  instrucción

Añade tu respuesta

Haz clic para o