In yours you dont put the X in one txtbox and the Y in another you just put the whole string in one textbox, can u try it when putting each value in different textboxes please. Im really stuck here. The error i get means that txtbox1 = Nothing and txtbox2 = Nothing how can i make them not equal Nothing??