473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Add post button to an Outlook form

I am creating a form in Outlook. I need a command button to post the form. What do i need between this to have it "Post" (Ctrl+Enter). all i need is for it is to do that key combination.

Private Sub CommandButton1_Click()

ctrl+enter

End Sub

Thank you in advance!
Oct 8 '07 #1
2 1286
mrnn
29
I am creating a form in Outlook. I need a command button to post the form. What do i need between this to have it "Post" (Ctrl+Enter). all i need is for it is to do that key combination.

Private Sub CommandButton1_Click()

ctrl+enter

End Sub

Thank you in advance!
outlook? is that visual basic? :P

well i'd use this, there's probably an easier way but i know how to do it at least :P and this is how it'd be on vb6, but i'm sure its similar with other versions

(In General Declarations)
Dim a, b as Boolean


Private Sub Form1_KeyDown(KeyCode as Integer) 'each key on the keyboard has its own code number

If KeyCode = (whatever it is for ctrl, sorry i dont know it off the top of my head...u can find it out easily by makin a program with this code in Form_KeyDown and makin a label control named label1 -Label1.caption = KeyCode-)
a = true
end if

if keycode = (whatever it is for Enter) then
b = true
end if

if a = true then
if b = true then
'post the form 'all this checks to see if both a and b are true
end if
end if

(also in KeyUp have the same thing but instead of equaling true, have them equal false so theyre only true when the buttons are pressed)

hope this helps yah :)
Oct 8 '07 #2
outlook? is that visual basic? :P

well i'd use this, there's probably an easier way but i know how to do it at least :P and this is how it'd be on vb6, but i'm sure its similar with other versions

(In General Declarations)
Dim a, b as Boolean


Private Sub Form1_KeyDown(KeyCode as Integer) 'each key on the keyboard has its own code number

If KeyCode = (whatever it is for ctrl, sorry i dont know it off the top of my head...u can find it out easily by makin a program with this code in Form_KeyDown and makin a label control named label1 -Label1.caption = KeyCode-)
a = true
end if

if keycode = (whatever it is for Enter) then
b = true
end if

if a = true then
if b = true then
'post the form 'all this checks to see if both a and b are true
end if
end if

(also in KeyUp have the same thing but instead of equaling true, have them equal false so theyre only true when the buttons are pressed)

hope this helps yah :)
Thank you! I'll give it try.
Oct 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: tabonni | last post by:
I want to check each button groups and save the checked value into a 2 dimensional array. But, it doesn't work. Could anyone tell me what's wrong with my code. My code is as follow: <html>...
6
by: Paul Perot | last post by:
Hi All: I was wondering if it was possible to evoke a post back event during code execution. I have a form that contains file specific information. I would like to iterate through an array of...
5
by: | last post by:
Hi all, Has anyone been able to write some custom javascript on the onclick event of submit button to do certain things like disable submit button, only submit form once etc. This was a breeze...
7
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant"...
10
by: Woody Splawn | last post by:
How do I fix it so that when the user preses Alt-X a certain button on the form gets fired? Also, How do I fix it so that when the esc key is pressed, the form is closed?
0
by: ratnakarp | last post by:
Is there any way i can improve on this code? If i run this application by giving the detials of the start date and end date in the range of 15 days, it's taking 3 mins. I'm looking for a code...
3
by: Bill | last post by:
I'm using the POST method to submit a simple form html page with yes/no and checkbox fields to an asp response page which stores the values in a new dim string, then uses it to build a new table...
8
by: Laith Zraikat | last post by:
I am trying to invoke a post request from code behind of an asp.net page using "WebClient" object, and I want the user to be redirected to the action url as well. So far Ive been able to send...
3
by: jubergolandaj | last post by:
I am working on Outlook Addin developed in C# and VS-2008. In this we are having our own custom form .oft On this form we have our custom “Send” button on click event of it our processing continues....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.