If you download Sparky's collision DLL, he provides a good example of this in the "Sliding Demo".
From the sound of your other posts, it seems you are attempting to create a First Person Shooter. But anyway, he provides a pretty efficient way to do this, and you are going to need to use his DLL anyway to do anything decent collision wise.
Plug it in the search, shouldn't be too hard to find. Just browse the "Sliding Demo" source code and you should see something like this:
if (dbKeyState(32) == 1 ) { vx = vx + dbCos(angy); vz = vz - dbSin(angy); } // D
if (dbKeyState(30) == 1 ) { vx = vx - dbCos(angy); vz = vz + dbSin(angy); } // S
if (dbKeyState(31) == 1 ) { vx = vx - dbSin(angy); vz = vz - dbCos(angy); } // A
if (dbKeyState(17) == 1 ) { vx = vx + dbSin(angy); vz = vz + dbCos(angy); } // W
www.Helios-Online.net