Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
VB Macro - Get and Put String from/to excel with PCOM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics
View previous topic :: :: View next topic  
Author Message
PANIGRAHI,DEVA

New User


Joined: 20 Aug 2012
Posts: 3
Location: India

PostPosted: Mon Aug 27, 2012 2:40 pm    Post subject: VB Macro - Get and Put String from/to excel with PCOM
Reply with quote

Hello Everyone,
I am writing a VB Script macro in an Excel to connect and get data from IBM Personal Communication Emulator.
As of now i'm able to establish connection between Excel and PCOMM, however unable to receive and send text strings from/to excel. Below is the piece of code I have tried -

Sub deva()
Dim PSObj As Object
Dim autECLConnList As Object
Dim PSText As String
Set autECLConnList = CreateObject("PCOMM.autECLConnList")
Set PSObj = CreateObject("PCOMM.autECLPS")
autECLConnList.Refresh
PSObj.SetConnectionByHandle (autECLConnList(2).Handle)
X = PSObj.StartCommunication()
PSText = PSObj.GetText(1, 1, 80)
MsgBox "PsText -" & PSText
End Sub

Please suggest the issue with the above code.
Back to top
View user's profile Send private message

Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Aug 29, 2013 7:04 pm    Post subject:
Reply with quote

I love this!

How do you know you are successfully connecting? Are you checking the value of X after the StartCom command?

Do you have two windows open? (Why are you using the second handle?)

The connection list might be zero based.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Calling and updating SAS Macro variab... Yogesh Jaiswal All Other Mainframe Topics 7 Thu Oct 11, 2018 12:37 pm
No new posts UNSTRING a big string Apurva Ghogale COBOL Programming 16 Thu Sep 20, 2018 12:12 pm
No new posts SMF IFAMGET macro GTPB_RETURNEDLENGT... ironheinrich7 IBM Tools 0 Thu Aug 02, 2018 6:53 pm
No new posts USS: Find and replace string within a... vasanthz All Other Mainframe Topics 5 Thu Aug 02, 2018 4:01 am
No new posts SMF IFAMGET macro GTPB_RETURNEDLENGT... ironheinrich7 PL/I & Assembler 0 Fri Jul 13, 2018 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us