This will create and write into a *.txt file of your choice. Put this code in a timer and you have yourself a keystroke logger. You can save the contents of a textbox into a file also.
Original Author: Abdul Kudrath
Assumptions
Put this code in a button and it will save the contents of a textbox.
Code
' code for saving into a .txt file
' put into a button
open "path and filename" for append as 1
' example C:demo.txt
print #1, text1.text
close 1