The coach has explained that Santos was close to finalizing an agreement with the Rossoneri for the Brazil international, who was keen on returning to the Vila Belmiro
The Club World Cup runner-up had been optimistic about its chances of bringing the Brazil international back to Vila Belmiro.
However, Ramalho explained that the Rossoneri is no long willing to sell the attacker now that it has balanced its books by cashing in on Ibrahimovic and Thiago Silva.
"The deal was being made," the coach told Terra. "But the sale of both players complicated things. If they had stayed it would have turned out differently.
"We were not far apart [in terms of a fee], the effort was great. But Milan did not want to complete the deal and now we know that it will not happen."
Robinho, who has been capped 90 times by the Selecao, made his name at Santos before moving to Real Madrid in 2005.