Serial Programming code help

I have been trying to figure out how to get the SerialPort to send data to the Arduino.

That has been successful, but now I have another problem. I have been working with Visual Basic to develop a controlling application that connects to the arduino but it does not communicate in the way I need it to because of how I initially set up my code, and I do not know the appropriate terminology to find out how to set it up.

Before:
Any information with /n ending is interpreted as a specific speed where the only input recognized is numbers at the moment. The numbers set the motors’ PWM duty cycle and the range is from 0-1024.

Now:

What I need to do is somehow write a code where once I click a button the serial program sends a simple letter and the arduino programming can interpret say a letter (u) and interpret it as an up and increase the speed by 10 or so and (d) executes a reduction in the variable by 10 or so.

I initialize my variable at 0, and eventually the “Start” button will initialize the speed at a users pref speed.

What is the best programming setup to adjust speed via clicks and possibly a slider, rather than manually entering in numbers in a serial monitor?

Eventually certain buttons will output a very specific number but I have had problems with the buttons adjusting the number for some reason. I think also, I might have to code in /n although I think it was built into my programs. I know that it is getting the data because when I click the button the rx and tx lights come on.

I don't see any of your code posted anywhere?!

Why not just use a slider? Use something like onChange to send command to Arduino. If you worry that is too frequent, then have a timer saved in the onChange method. Save system time to the timer after you send a command. Next time it runs, compare and only send command if it has been say 50ms since last command was sent.

Yeah, I think you need to be more specific about what you're hung up on. You mentioned something isn't working they way it should. What is it doing, and what should it be doing? Post your code (use code tags) and walk us through what is happening, and how that's different than what you want to happen.