1

問題:

SendKeysExcel アプリケーションから別の (Microsoft 以外の) アプリケーションにデータをコピーしようとすると、Num Lock が無効になります。

Sub Test()

    Range("A1:B71").Select
    SendKeys "^C" 'Copies Selected Text

    AppActivate "AccuTerm 2K2"
    SendKeys "2", True    'Enters to notes screen
    SendKeys "^M", True   'Confirms above (Enter key)
    SendKeys "^V", True   'Pastes into client application

    Application.Wait (Now + TimeValue("0:00:05"))
    'Providing time for client application to finish
    'pasting...

    SendKeys "^M", True   'Next three enters are to
    SendKeys "^M", True   '...exit notes section
    SendKeys "^M", True
    AppActivate "Microsoft Excel"

    Range("B52:B62").Clear  'Clears the Template
    Range("B52").Select     'Resets Cell Position

End Sub

優先解像度:

コードが NumLock を無効にしないようにするにはどうすればよいですか? またはコードが完了したら、numlock を再度有効にするにはどうすればよいですか?

4

2 に答える 2