Help with Autokey please

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I would like to assign today's date to the F2 key. I understand the Autokeys macro and have named macro {F2} but cannot figure out the code I need to say whatever field I am in type todays date - must use Date() function somehow I know.

I'm not a VB whizz so help would be much appreciated

Thanks in advance
 
Use the SetValue action, on Screen.ActiveControl

As always, the macro cannot be bombproof, e.g. it will cause problems if the
active control is a command button, or a numeric field, or the form is
read-only, or ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Sheila D said:
I would like to assign today's date to the F2 key. I understand the
Autokeys macro and have named macro {F2} but cannot figure out the code I
need to say whatever field I am in type todays date - must use Date()
function somehow I know.
 
That's brilliant Allen

Tx

Sheila

Allen Browne said:
Use the SetValue action, on Screen.ActiveControl

As always, the macro cannot be bombproof, e.g. it will cause problems if the
active control is a command button, or a numeric field, or the form is
read-only, or ...

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.


Autokeys macro and have named macro {F2} but cannot figure out the code I
need to say whatever field I am in type todays date - must use Date()
function somehow I know.
 
Sheila D said:
Hi

I would like to assign today's date to the F2 key. I understand the
Autokeys macro and have named macro {F2} but cannot figure out the
code I need to say whatever field I am in type todays date - must use
Date() function somehow I know.

I'm not a VB whizz so help would be much appreciated

Thanks in advance

Are you aware that the Ctrl+; combination -- that is, "control
semicolon" -- is already defined to insert the date?
 
Sheila D said:
Hi

I would like to assign today's date to the F2 key. I understand the
Autokeys macro and have named macro {F2} but cannot figure out the code I
need to say whatever field I am in type todays date - must use Date()
function somehow I know.
 
Back
Top