Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catch Highlighted line on Extra screen

Status
Not open for further replies.

sltrr

Programmer
Jan 9, 2015
2
US
My first post, ever!

trying not to give away business property, I am using excel vba macro to attachmate EXTRA screen.


Result of code below is if the data (dataMatch) is found on the screen ("FD FIND"), the rows (row 2 - 23) are HIGHLIGHTED on the screen. For the screens I am working with, I expect only one row to be highlighted (or none).
How can I capture the line on the screen that is HIGHTLIGHTED (or multilple highlighted rows, for future reference) so that I can use Mid or Trim to extract specific data on that highlighted line?

The row/column indicator remains 01/03 where the command was put to do the FIND.

Currently I am using Do Loop to look at each row for a match of dataMatch.

Call sys.SendKeys("FD FIND " & dataMatch)
Call sys.SendKeys("<ENTER>")
sys.Wait = 200
 
Hi,

So your "highlight" could be a used generated SELECTION that appears as highlighted, or it could be a programmed highlight of some flavor (some shaded background).

So what are we looking at?
 
Sorry for the delay. I got pulled away from this optional project.

My screen colors are black background, green protected and yellow enterable (line 1). When I do a "find", the found match is white.
 
I never did anything like this on a screen.

I'm retired and have no access to the Extra VB HELP file to determine if there is a Selection object or method.

That's where I'd start looking, in HELP.
 
Hello all! I' m new to this forum and I have the same problem. The find command is essential for the kind of work I do, and having a macro that can detect a resulting highlighted row, placing the cursor before it could help me greatly in automating a lot of things I am requested to do.
Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top