Melt the butter in a large pot or Dutch oven over medium heat. Add the onion, celery and carrots and cook for 5–6 minutes, until softened.
Sprinkle in the flour and stir for 1 minute.
Slowly pour in the broth, stirring as you go so no lumps form.
Add the potatoes. Bring to a boil, then reduce the heat and simmer for 15 minutes, until the potatoes are tender.
Stir in the ham and milk. Heat for 5 minutes without letting the soup boil.
Mash some of the potatoes against the side of the pot to thicken the soup. Season with the pepper and add salt only if needed.