troubleshooting Question

How to search inside Attachmate EXTRA! VB Excel Macro

Avatar of NYANBCNY32
NYANBCNY32Flag for United States of America asked on
Microsoft OfficeMicrosoft ExcelVBA
3 Comments1 Solution526 ViewsLast Modified:
I'm trying to code a macro in Excel VB that will search an Attachmate Extra! Session and scrape data from the screen into Excel. This is what I've coded so far but not sure if the spaces are causing an issue. The problem is that it's only matching by the word "Type" and I need it to be an exact match as there are several TYPE that are listed on the screen.

Is there something I'm missing to put into this so that it will only match the search string criteria? Any help would be greatly appreciated. Thank you.



SearchString = ("TYPE   00")

Set MyArea = Sess0.Screen.Search(SearchString)
If MyArea.Top <> SearchString Then
Sess0.Screen.SendKeys "<Enter>"
ElseIf MyArea.Top = SearchString Then
Sess0.Screen.Row = MyArea.Top
Sess0.Screen.Col = MyArea.Right+1
X = Sess0.Screen.Row
Y = Sess0.Screen.Col
i = 6
DATA= Format$(Format$(Sess0.Screen.GetString(X, Y, i), "##/##/##"), "mm/dd/yy")
Let ActiveCell.Offset(0, 0).Range("F1") = DATA
End If
ASKER CERTIFIED SOLUTION
NYANBCNY32

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros