How would I make this code work?
I am trying to move a box around the screen randomly.
This throws a math error "59%x"
Sub BlipRun
Dim x As String
Dim y As String
Dim w As String
Dim h As String
w = 1%x
h = 1%y
x = Rnd(1, 100) & "%x"
y = Rnd(1, 100) & "%y"
Blip.left = x
Blip.Top = y
Blip.Width = w
Blip.Height = h
End Sub
I am trying to move a box around the screen randomly.
This throws a math error "59%x"
Sub BlipRun
Dim x As String
Dim y As String
Dim w As String
Dim h As String
w = 1%x
h = 1%y
x = Rnd(1, 100) & "%x"
y = Rnd(1, 100) & "%y"
Blip.left = x
Blip.Top = y
Blip.Width = w
Blip.Height = h
End Sub