In my pong game when the ballhits a ball I have it call a public sub routine but when i say picball.move picball.left + 20 it gives me a error object required. Does the module not see the picball object? Thanks
Printable View
In my pong game when the ballhits a ball I have it call a public sub routine but when i say picball.move picball.left + 20 it gives me a error object required. Does the module not see the picball object? Thanks
Is picBox a picturebox?
If so the module won't see it directly
you need to specify what form it's on, If it's on form1 you need
Code:Form1.picBall.Move Form1.picBall.Left + 20
Ă€nother thing you could do is to pass the picturebox reference:
Code:Sub Yoursubwhateveryouhadinthatmodule(picball as picturebox)
picBall.Move picBall.Left + 20
End sub
Thanks both ways work like a charm!