This program edits a cell using one of the predefined function keys. 'Then it follows the filename "TRIAL" and ten hits on enter ( equivalent to pressing the save button).Ģ. 'this sends an (Alt + F + A) which is the shortcut of (File > Save As). 'Hit the enter key using sendkeys method. 'Sending keystrokes to write to the notepadĪpplication.SendKeys "Hello World!", True VarRet = Shell("NotePad.exe", vbNormalFocus) to open a notepad application from Windows This program opens a notepad, types “Hello World!" and saves the file with the name “TRIAL" without changing the default path. One example of such an application is Notepad or Notepad++. It is advisable to use this only when any other form of communication is not supported by the application. Sending keystrokes to the open and active window is definitely a feasible option, but should be only be considered an alternative method. This is a substitute for manual typing or keystrokes. S.no Key Code 1 SHIFT “+” 2 CTRL “^” 3 ALT “%” 4 Backspace 26 TRUE TRUE 27 FALSE FALSE
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |