The following should help - there's also a very good tutorials on 7940G handsets online on the Cisco web site:
http://www.cisco.com/E-Learning/bulk/public/celc/7940_Tutorial/index.html
Perform the following steps to configure the Speed Dial Lines feature.
Step 1 Press the settings button.
Step 2 Press the Scroll key to highlight Call Preferences.
Step 3 Press the Select softkey.
Step 4 Press the Scroll key to highlight Speed Dial Lines from the Call Preferences menu.
Step 5 Press the Select softkey.
Step 6 Press the Scroll key to highlight Line 3, Line 4, Line 5, or Line 6.
Note There are four possible speed dial numbers that can be configured on the Cisco IP 7960G and
one possible speed dial number on the Cisco IP 7940G.
Step 7 Press the Edit softkey.
Step 8 Enter a brief description for the selected speed dial line for New Label.
Depending on the letter, you might need to press the number button on the dialing pad one or more times
to scroll through the list of displayed characters until you highlight the correct character. You can press
the <-- softkey to move the cursor one character to the left deleting the last character each time the
softkey is pressed. Pressing the 1, *, or 0 keypad keys allows you to enter some special characters.
Step 9 Press the Scroll key down arrow to select the New Number line.
Step 10 Press the Number softkey and enter a number for the selected speed dial line.
Step 11 When the New Label and New Number are correct, press the Accept softkey.
I won't take full credit for this as it came off Cisco's website:
http://www.cisco.com/en/US/docs/voice_ip_comm/cuipph/7960g_7940g/sip/english/user/guide/sipuget.html#wp1053935
Hope this helps...