To phrase your question correctly... :
Can sentence"I didn't have any trouble with it" be replaced by "I hadn't any ..." ?===> Can this sentence, "I didn't have have any trouble with it" be replaced by "I hadn't any..?"
No, because "I hadn't any..." is supposed to be written as "I haven't had any trouble with it.." then it could replace "I didn't have any trouble with it." Although, I've heard native English speakers use "I hadn't any," which technically is incorrect.
The difference is that "hadn't" is present perfect and "haven't" is past perfect.
For example:
Hadn't: Right when he arrived, she hadn't spoken a word.
Haven't: ex : I haven't liked you since you stole my doughnuts.
Hope that helps! Also, if other italki members think I'm wrong, feel free to correct me and maybe I'll learn something new. n_n