Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Macro - Application.Sendkeys, New Laptop Problem

Macro - Application.Sendkeys, New Laptop Problem

Scheduled Pinned Locked Moved Visual Basic
helpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wakkerjack
    wrote on last edited by
    #1

    Hi ALL! I wrote a very small app which reads out the cell values in excel and "Sendkey"s them to another application. I would firstly Send an 'alt tab' to set focus on the receiving application. Then basically flush all of the cell values. E.g. of code used: Application.Sendkeys "%{tab}", True Application.Sendkeys ActiveCell.Value, True Now, the problem is that it used to work perfectly on my old slow ass donkey machine. I recently got a newer, slicker machine and it just doesnt write the values to the application. It 'alt tabs' but just doesnt write them. Any suggestions? I will consider looking into AppActivate instead of 'alt tab'. Thanks Peeps!

    W 1 Reply Last reply
    0
    • W wakkerjack

      Hi ALL! I wrote a very small app which reads out the cell values in excel and "Sendkey"s them to another application. I would firstly Send an 'alt tab' to set focus on the receiving application. Then basically flush all of the cell values. E.g. of code used: Application.Sendkeys "%{tab}", True Application.Sendkeys ActiveCell.Value, True Now, the problem is that it used to work perfectly on my old slow ass donkey machine. I recently got a newer, slicker machine and it just doesnt write the values to the application. It 'alt tabs' but just doesnt write them. Any suggestions? I will consider looking into AppActivate instead of 'alt tab'. Thanks Peeps!

      W Offline
      W Offline
      wakkerjack
      wrote on last edited by
      #2

      I have discovered that Excel 2003 likes to choose when to send the alt key (%). If I edit the code and save it, then run it. it works fine. If I open the xls file and just run it, it does not work. Please can anyone tell me how to get excel to send the alt key every time? I have tried "Application.Sendkeys" and "Sendkeys". Thank You

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups