You can use Try..Catch to rollback database operation by placing the rollback statement at the Catch Segment.
Try
'Do the database operation...
xCmd.CommandText = "INSERT into ...."
xCmd.ExecuteNonQuery()
objTrans.Commit()
conn.Close()
Catch ex As Exception
'Rollback action when something goes off
objTrans.Rollback()
conn.Close()
End Try