. . . when will I be able to have credit again?

Surprisingly soon. Many debtors receive a letter almost immediately from their former creditors who will reestablish credit upon payment of some or all of the previous debt. This is called reaffirming the debt, and you are not required to do so. 

In addition, debtors are frequently contacted by credit card companies that will issue a card to be used up to a specific amount which has been paid to them as a deposit. This can be useful in situations where a credit card is required, such as for renting a car, and it can help you to reestablish your credit over a period of time.