I seek a way of selecting a table field, then having a preset autokey (shortcut key) configured, that when pressed, runs a bit of VBA, that inserts a number (1 more than the last) into the selected field.
I know how to do autokeys.
I know how to store a number, recall it, increment it, then store it away again.
What I don't know is the mechanism of getting that number out of the VBA code (a variable)& into the clipboard.
A bit of googling revealed this...
specifically, this post...
I have now got it workiny by using the following.
Dim DataObj As New MSForms.DataObject
Dim S As String
S = Me.Stores_Address
It didn't work earlier as FM20.dll was not referenced in tools / reference. As soon as I manually referenced this, it all started to work.
...it's not working for me either...presumably I need to enable FM20.dll ...but I don't see it under references?