Page 1 of 1
How to use a string in a sendkeys statement?
Posted:
Tue Jan 08, 2013 12:47 am
by PuddinPie
Hello,
I'm trying to DIM out a string variable and then use it in a send keys.
I can't seem to get he syntax correct for the sendkeys using the AccountMSCD variable.
For example:
DIM AccountMSCD as string
'Getting a variable from PComm using VBA.
AccountMSCD = objECLPS.GetText(7, 36, 6)
‘Trying to send that string but I can't get the syntax correct.
objECLPS.SendKeys = (AccountMSCD, 6, 16)
Thank you.
Re: How to use a string in a sendkeys statement?
Posted:
Tue Jan 08, 2013 1:24 pm
by nareshv_99
Hello,
use objECLPS.SendKeys(AccountMSCD, 6, 16). I think this should work.
Re: How to use a string in a sendkeys statement?
Posted:
Tue Jan 08, 2013 7:45 pm
by PuddinPie
It did not work. It's erroring saying that it's expecting "=" and adding the "=" does not work either.
Re: How to use a string in a sendkeys statement?
Posted:
Tue Jan 08, 2013 7:50 pm
by BillyBoyo
You have to post the full details of any messages and show the exact statement you used.
Re: How to use a string in a sendkeys statement?
Posted:
Tue Jan 08, 2013 8:12 pm
by nareshv_99
I use below code to interact Excel with Mainframe
Sample given below:
Set autECLConnMgrObj = CreateObject("PCOMM.autECLConnMgr")
Set autECLOIAObj = CreateObject("PCOMM.autECLOIA")
Set autECLSessionObj = CreateObject("PCOMM.autECLSession")
Set autECLPSObj = CreateObject("PCOMM.autECLPS")
autECLOIAObj.SetConnectionByName ("A")
autECLPSObj.SendKeys ("abcd")
and it works for me.. check if you are using correct Object to call SendKeys
Re: How to use a string in a sendkeys statement?
Posted:
Wed Jan 09, 2013 2:32 am
by NicC
Looks to me like this is NOT mainframe topic but a PC topic, in particular Excel. Just because you are going to send the file to the mainframe does not make it a topic for a mainframe forum. Find an Excel forum.
Re: How to use a string in a sendkeys statement?
Posted:
Wed Jan 09, 2013 7:20 pm
by Ed Goodman
Nic,
I vote for giving this some leeway because it's a terminal emulator issue. The idea of using PC tools to work with mainframe tech seems to be at least somewhat relevant.
Re: How to use a string in a sendkeys statement?
Posted:
Wed Jan 09, 2013 8:31 pm
by dick scherrer
Hello,
And there is more of this kind of "overlap" coming rather than less . . .
d