No one's going to mention the fact that he entered a string as an argument where it wants an int?
Either do (recommended)
or (not recommended)
Dim ammount As Integer = Convert.ToInt32(TextBox1.Text)
I don't believe Int64 is required here because you're rarely going to need numbers over 2147483647, but if you ever do, use Int64 instead.
WriteInteger("iw7_ship", &H145BCEE51, Convert.ToInt32(ammount))
I have a trainer base in C#if you want to see bits and pieces (because VB makes me want to cry).