If you are using vb 2005 then you don't need to dim a new form just load the second form. Just make sure that the "Shutdown" in the Projects is set to "When last form closes". If it is set to "When startup form closes" then as soon as you close form1 then the program ends.
frmattendance.txttdays.Text = days
frmattendance.l2.Text = dtp.Text
If you are using vb 2002 or 2003 try this. I don't have either but this should work.
Dim f As New frmattendance
f.txttdays.Text = days
f.l2.Text = dtp.Text
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: