If the HTC DESIRE Z also on same O2 network from same country,you can use the sim card in it.If the HTC Desire Z is an unlocked phone ,sure it will accept any GSM network sim card like O2.If it is a locked phone it will not accept other network sim card,it will display "Invalid Sim" .So you need to unlock it.Get unlock code from the site Mobileunlocksolutions.com and unlock easily.Then use any GSM network sim card in it.It will accept O2 sim card.