I am guessing you are using the Jungle Brand Medicated food? After you crush it a little try soaking it. I crush it in a spoon and then add a few drop of water and let that sit for like 5 minutes. The trick here is to only use a couple drops of water. You want to soften the food, but not rinse out the meds. If he still wont take it, then use a frozen Bloodworm cube. Melt the cube and use the bloody water that melts off of it to re-hydrate the food.
If that still does not work, then perhaps make your own medicated food. The jungle food/meds are either the anti-bacterial type (which contains Sodium sulfathiazole and nitrofurazone) or the anti parasite type which contains (Metronidazole, Praziquantel, and Levimasole). These are medications which are readily available. So depending on what you are treating you can get the same medications and mix then with his favorite food (which if he is like my Betta was, that favote food is live fruitflys).
Crush the desired amount of medication and food together, add a very little water to make a thick paste. Roll that into little balls and let it dry a bit (or not). I have seen suggestion to use plain gelatin to help hold it together. I have not needed to do this myself (add gelatin that is).