Hi Skip,
I will be experimenting for quite a bit of time since I am very new to VBA. I will try your suggestions in order to break it down slowly and find the issue. Thank you so much for your help and advice Skip, I really do appreciate it!
Hi Skip,
Tested it for a while and excel is still freezing.
Well it isn't just after a GetString(), but usually after some time that the macro has been interacting with Mainframe. It seems that mainframe falls behind, so therefore I have to introduce a sleep to slow it down. It just seems...
Hi Skip,
I see there is no copy/paste's, my turn to have a brainless tangent....
However, I have made your suggested changes with the get string (assigning a variable to the string, then assigning the variable to the cell). I have also removed all the 'sleeps', however the code did not work...
Hi Skip,
Thanks for the feedback.
The intention of the code is to collect the 17 length string from coordinates 23,2 going rightwards (which should say "UPDATE SUCCESSFUL"). If I get the entire line and trim this, it will collect other information and text which is not needed. The main aim is...
Here you go!
'
' Global variable declarations
Public g_HostSettleTime%
Public g_szPassword$
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr)
Sub PlanGroups()
'--------------------------------------------------------------------------------
' Get the main...
Hello,
I have the following vba code running from excel which interacts with the Mainframe perfectly.
'
' Global variable declarations
Public g_HostSettleTime%
Public g_szPassword$
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr)
Sub PlanGroups()...
Thank you skip for the resources you have provided.
For anyone else reading this in the future with a similar problem such as myself, the solution is to use
Do While Sess0.Screen.OIA.Xstatus <> 0
DoEvents
Loop
Instead of waiting for the processes to finish, this waits for the xclock...
I believe its an issue with the (wait) function, wait for cursor or string or wait on host are not working at all and causing freezing. Is there any alternative function which will do the same thing?
Apologies for the late reply.
Usually it would take less than a second, but sometimes it can take over 4/5 seconds. Hence I wanted a method for the code to continue once the previous process had completed.
On your final note, yes it does still lock up.
Within the attachmate macro section...
Hi Skip,
The solution below that you suggested still isn't working, it is still freezing everytime meaning I have to close down excel and Attachmate. Any suggestions?
Do Until sess0.screen.WaitForCursor(24, 17)
DoEvents
Loop
Hi Skip,
Fantastic, introduced the wait for cursor loop and it worked a treat, no more freezing!
However, there is another issue I am now having. Say for example I wanted to send keys to the screen such as:
Sess0.Screen.SendKeys (" Cells(9, "F").Value & <Enter>")
I want to send to the screen...
The image below is my query panel. I would like to paste data in say for example the date (claim end) row, from a particular cell in excel, and then run the report. How do I do this?
I am very new to VBA and currently have got to the stage of opening business objects, and opening my file :(...
Hello,
This is my first post so be kind!
Below I have a very basic Macro I have recorded using Attachmate.
' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$
Sub Main()
'--------------------------------------------------------------------------------
' Get the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.