Perhaps the fact that you're unloading Form4 in the Command1_Click event before you're executing the code has something to do with the problem
lol i missed that