Quote Originally Posted by Grimfort View Post
You just need to cast it to the correct type:

Code:
Button1.Margin = DirectCast(Button1.Tag, Padding)
It is safer to check the type however:

Code:
If TypeOf Button1.Tag Is Padding Then
Button1.Margin = DirectCast(Button1.Tag, Padding)
End If
Thanks Grimfort, I'll give that a go.