Trouble with copy-append in Excel macro

superB314

New Member
Joined
Aug 21, 2019
Messages
1
Hi - hopefully this is the right place to ask this. I'm working on coding a macro in Excel that will access IBM Personal Communications, cycle through 15-20 different screens, copy-append each screen, and then paste them all in Excel. I originally coded the macro in PCOM (version 13.0 if that's relevant), and when I run the macro through PCOM the copy-append functionality works just fine. When I transferred the code to VBA in Excel so I could run the macro from Excel and have Excel access PCOM, the copy-append functionality is not working. The macro is running through all the screens as it should, but when it goes to paste the screens in Excel, there's nothing copied to the clipboard. So I'm wondering if there's a piece of code I'm missing that's preventing the screens from copying. The bottom third of the code essentially gets repeated for each different screen I need to access. Is there anything obvious I'm missing? Thanks in advance!

Dim Auteclconnlist
Dim auteclpsobj
Dim autecloia
Dim Auteclps
Dim session
Dim trailers
Dim rolltrailers
Dim maj
Dim nftrailers
Dim rollnftrailers
Dim xcl
Dim autELCMacro



Set Auteclconnlist = CreateObject("pcomm.auteclconnlist")
Set auteclpsobj = CreateObject("pcomm.auteclps")
Set autecloia = CreateObject("pcomm.autecloia")
Set Auteclps = CreateObject("pcomm.auteclps")
Auteclconnlist.Refresh
session = UCase("A")
auteclpsobj.SetConnectionByName (session)
autecloia.SetConnectionByName (session)
Auteclps.SetConnectionByName (session)
auteclmacro = "[edit-copyappend]"
autecloia.WaitForInputReady


autecloia.WaitForInputReady
Auteclps.SendKeys "dmsk1164"
autecloia.WaitForInputReady
Auteclps.SendKeys "[enter]"

Auteclps.WaitForAttrib 2, 1, "00", "3c", 3, 10000


Auteclps.WaitForCursor 2, 2, 10000


autecloia.WaitForAppAvailable
autecloia.WaitForInputReady
autecloia.WaitForInputReady

auteclmacro = "[edit-copyappend]"
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top