Mr. Milson
thank you very much for your help.the below code i created for second screen
second screen ROW5/088 = sJournalId = Trim(oExtraScreen.GetString(iExScrnRow, 22, 10)) = second screen ROW5/088
but what happens here it goes 02 to 109 check everything
and repeating the same journal id in sheet 1, if it is repeat it does not need ot write in sheet2. see this below code any changes, please
Do
'Sess0.Screen.GetString(3,20, 25))
Journalid = Trim(Sess0.Screen.GetString(5, 58, 12))
Optkey = Trim(Sess0.Screen.GetString(8, 80, 1))
OptkeyMask = Trim(Sess0.Screen.GetString(9, 3, 100)) + Trim(Sess0.Screen.GetString(10, 3, 100))
Translist = Trim(Sess0.Screen.GetString(13, 16, 100))
TL = Trim(Sess0.Screen.GetString(13, 80, 1))
Optaccess = Trim(Sess0.Screen.GetString(18,10,1))
Update = Trim(Sess0.Screen.GetString(18,20,1))
Optinsert = Trim(Sess0.Screen.GetString(18,30,1))
Replace = Trim(Sess0.Screen.GetString(18,40,1))
Delete = Trim(Sess0.Screen.GetString(18,50,1))
Move = Trim(Sess0.Screen.GetString(18,60,1))
Overlay = Trim(Sess0.Screen.GetString(18,71,1))
FOR RW = 2 to 109
If Journal id = obj.Worksheets("Sheet1").cells(RW,"B").value then
RW = RW + 1
With obj.Worksheets("Sheet2")
.Cells(Rw, "A").Value = Jouranlid
.Cells(Rw, "B").Value = OptKey
.Cells(Rw, "C").Value = optKeyMask
.Cells(Rw, "D").Value = TL
.Cells(Rw, "E").Value = TransList
.Cells(Rw, "F").Value = Optaccess
.Cells(Rw, "G").Value = Update
.Cells(Rw, "H").Value = Optinsert
.Cells(Rw, "I").Value = Replace
.Cells(Rw, "J").Value = Delete
.Cells(Rw, "K").Value = Move
.Cells(Rw, "L").Value = Overlay
'obj.Worksheets("Sheet2").Cells.Sort Key1:=obj.Worksheets("Sheet2").Columns("D"), Header:= 1
obj.Save
End with
Else
End if
Next
Sess0.Screen.SendKeys ("<PF8>") 'next screen
Sess0.Screen.WaitHostQuiet (100)
Loop