VBA code Help
VBA code Help
VBA code Help
VBA code Help
VBA code Help
VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help
VBA code Help VBA code Help
VBA code Help
Go Back  Xtreme Visual Basic Talk > > > VBA code Help


Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2013, 01:13 PM
photoguy999 photoguy999 is offline
Newcomer
 
Join Date: Jul 2013
Posts: 6
Red face VBA code Help


I need help on how to code (take two value from excel to used in session a. and then return a amount) the code below is getting one cell from excel but i need it to get cells (a1) and (B2) and place in different area in session a screen.
You help is greatly appreciated.

C

Sub CLFQSTAT()



Set Sess = GetObject("C:\Program Files\Attachmate\E!E2K\Sessions\A SESSION.EDP")

Set Myscreen = Sess.Screen



If Sess.Screen.GetString(1, 2, 4) <> "retr" Then

Myscreen.putstring "retr", 21, 7

Myscreen.SendKeys ("<Enter>")

Myscreen.WaitHostQuiet (500)

' for more screen to next

For Each Account In Worksheets("DISTRICT").Range("A02:A7").Cells

If Account.Value <> "" Then

Myscreen.putstring "CLFQ", 21, 7

Myscreen.SendKeys ("<Enter>")

Myscreen.putstring Account.Value, 3, 7

Myscreen.putstring "y", 8, 28

Myscreen.SendKeys ("<Enter>")

Myscreen.WaitHostQuiet (500)

Myscreen.SendKeys ("<PF4>")



Myscreen.WaitHostQuiet (500)

AmountTOTALNUMBER = Myscreen.GetString(3, 21, 4)

AmountTOTALASSIGN = Myscreen.GetString(4, 21, 4)

Debug.Print AmountTOTALNUMBER

Debug.Print AmountTOTALASSIGN

Account.Offset(0, 3).Value = AmountTOTALNUMBER

Account.Offset(0, 4).Value = AmountTOTALASSIGN


End If



Next

End If


End Sub
Reply With Quote
  #2  
Old 08-10-2013, 03:26 PM
Gruff's Avatar
GruffVBA code Help Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

photo,

It seems your posting questions relating to Attachmate's sessions product.
I would be surprised if anyone here has experience with it.

Indeed I know nothing about what you are using it for. Are you using it to remote from some OS other than windows into a windows workstation?
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
  #3  
Old 08-10-2013, 09:46 PM
photoguy999 photoguy999 is offline
Newcomer
 
Join Date: Jul 2013
Posts: 6
Default

As you can see this line pull info from cell a2 . However i need to pull data from a2 and B2 and place in attachmate session then press enter and debug and print result. I been only working with working with one cell of info at a time,

For Each Account In Worksheets("DISTRICT").Range("A02:A7").Cells
Reply With Quote
  #4  
Old 08-12-2013, 01:38 PM
Gruff's Avatar
GruffVBA code Help Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

I asked a question.

Your refusal to answer questions will not get you help on this forum.

Indeed, such behavior comes across as impatient if not downright hostile.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
VBA code Help
VBA code Help
VBA code Help VBA code Help
VBA code Help
VBA code Help
VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help VBA code Help
VBA code Help
VBA code Help
 
VBA code Help
VBA code Help
 
-->