-
There is alot more to it but to some extent , yes. Use SendKeys() as there is no SendKey(). API commands offer some other options.
e.g.
[VBA]Sub SavePartcorrect()
Dim myPath As String, txtPath As String
Dim rc As Long
Dim wb As Workbook
Set wb = ActiveWorkbook
myPath = ThisWorkbook.Path & "\"
txtPath = myPath & "Test.txt"
rc = Shell("NOTEPAD.EXE " & txtPath, vbNormalFocus)
AppActivate rc
Application.Wait Now + TimeValue("00:00:01")
SendKeys Application.UserName, True
SendKeys "{Enter}", True
End Sub[/VBA]
Here are some API methods to give you an idea of other possibilities. Put this code in a Module. http://vbaexpress.com/forum/showthread.php?t=26601
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules