WARNING: Always make a backup of your savegame before edititng!
To modify the amount of gold contained in your "Stash", do the following:
1) Try to put at least 1000 gold in your stash. This cheat will work with smaller amounts, but you may be limited on how much you can add.
2) Load your game. Record the amount of gold in your stash. Exit from game.
3) Load a Hex Editor and convert your gold to HEX. Open the file savegame.d2s (savegame will be the name of your character) in your Diablo 2 save folder.
4) Search for the HEX location (from converted amount of gold). Modify the HEX location to FFFF (or any amount in HEX that you wish - up to 65000). Save the file.
5) Re-load your Diablo 2 savegame and you will have 65000 in your stash!