E
Evil Red Smuf
Hi guys can you help?
I've written some code to move a shape around a square path using the row and column numbers to denote when the shape should change direction. However I've come a bit stuck! The little red circle moves around 3/4 of the square but then pops up with an error. Here's the code where the problem occurs:
With activesheet.shapes("RedDot")
For i = 1 to 16*d
Select Case range("A1").value
case "down"
.top = .top - .topleftcell.offset(-i).height
more stuff.....
case "left"
more stuff
End Select
Next
End With
The debug highlights the line beginning .top = .top......
There's a whole host of other movements contained later on in the code but they all work fine, it's just that 1 line. If anyone can tell me what I've done wrong it would make my year!
Submitted via EggHeadCafe - Software Developer Portal of Choice
How To Create a Custom IE8 Accelerator
http://www.eggheadcafe.com/tutorial...a-11c3e7cc2a61/how-to-create-a-custom-ie.aspx
I've written some code to move a shape around a square path using the row and column numbers to denote when the shape should change direction. However I've come a bit stuck! The little red circle moves around 3/4 of the square but then pops up with an error. Here's the code where the problem occurs:
With activesheet.shapes("RedDot")
For i = 1 to 16*d
Select Case range("A1").value
case "down"
.top = .top - .topleftcell.offset(-i).height
more stuff.....
case "left"
more stuff
End Select
Next
End With
The debug highlights the line beginning .top = .top......
There's a whole host of other movements contained later on in the code but they all work fine, it's just that 1 line. If anyone can tell me what I've done wrong it would make my year!
Submitted via EggHeadCafe - Software Developer Portal of Choice
How To Create a Custom IE8 Accelerator
http://www.eggheadcafe.com/tutorial...a-11c3e7cc2a61/how-to-create-a-custom-ie.aspx