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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I clear an Extra Screen through VBA?

Status
Not open for further replies.

ISUTri

MIS
Mar 25, 2004
38
US
I have built a piece of code that enters Part Information into a screen, inquires on it, and if necessarry enters the necessarry information into the screen. However, i've found that i need to clear the screen before i enter the next part info into it. I was wondering how can i do this? Do I need to "sendKeys" spaces? Or is there a more sophisticated way of doing this?

Thanks in advance for your help!!

Also, could anyone tell me what the following statements do?
Sess0.Screen.SendKeys "<Clear>"
Sess0.Screen.SendKeys "<Reset>"
 
Here is the code that i've used so far to try and accomplish this. This code does not work (select all looks like it works though).

AppActivate "Session2"
Sess0.Screen.SelectAll
Sess0.Screen.Delete
 
On your system, do you have a blank screen that you have full typing ability on, or do you have fields that you have to type in?

If it's the first case, then Sess0.Screen.SendKeys ("<Clear>") should work.

In the second case you'll need to clear all the fields independently. The code here is EraseEOF. Here's how I typically do this for a field:

'Move to the correct field and clear it
Sess0.Screen.MoveTo 3,7
Sess0.Screen.SendKeys("EraseEOF")

You may also want to look at the FAQ:
I'm ready for Extra Basic... now what? faq99-4087

Hope this helps a bit,

calculus

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top