Hey guys, love this forum and have been using it ever since I got this job as an application developer here.
Luckily enough, I haven't had to create an account before today as I could always find what I wanted on here.
Today is the exception.
I'm coding a macro for extra (quite a switch from my usual .net development) and I'm having some trouble writing data from attachmate back to excel.
For i = 3 To xl_wb.Sheets(2).UsedRange.Rows.Count
'get the cell value at the desired location
curr_cell = xl_wb.Sheets(2).Cells(i, 2)
'enter the information to go to the SDDQ screen
MyScreen.MoveTo 1,8
MyScreen.SendKeys("SDDQ")
MyScreen.MoveTo 2,8
MyScreen.SendKeys(curr_cell)
MyScreen.SendKeys ("<Enter>")
waiting = MyScreen.WaitForString("PROJECTED", 9,5)
'go to page 1 of the SDDQ screen
MyScreen.MoveTo 1,8
MyScreen.SendKeys("p1")
MyScreen.SendKeys("<Enter>")
waiting = MyScreen.WaitForString("ITEM CLASS", 7,2)
'put the price in the appropriate cell of the spreadsheet
price = MyScreen.GETstring(7,66, 13) 'row 7 column 65 for 14 characters
'*******************************'
'This is where I want to write PRICE to cell i,7
Next i
I commented above where I want to put the 'price' variable, if someone could help me out that would be great.
Oh also, by all means if I'm not doing something the best way there is to do it, let me know! I'm definitely a noobie when it comes to this language.
Luckily enough, I haven't had to create an account before today as I could always find what I wanted on here.
Today is the exception.
I'm coding a macro for extra (quite a switch from my usual .net development) and I'm having some trouble writing data from attachmate back to excel.
For i = 3 To xl_wb.Sheets(2).UsedRange.Rows.Count
'get the cell value at the desired location
curr_cell = xl_wb.Sheets(2).Cells(i, 2)
'enter the information to go to the SDDQ screen
MyScreen.MoveTo 1,8
MyScreen.SendKeys("SDDQ")
MyScreen.MoveTo 2,8
MyScreen.SendKeys(curr_cell)
MyScreen.SendKeys ("<Enter>")
waiting = MyScreen.WaitForString("PROJECTED", 9,5)
'go to page 1 of the SDDQ screen
MyScreen.MoveTo 1,8
MyScreen.SendKeys("p1")
MyScreen.SendKeys("<Enter>")
waiting = MyScreen.WaitForString("ITEM CLASS", 7,2)
'put the price in the appropriate cell of the spreadsheet
price = MyScreen.GETstring(7,66, 13) 'row 7 column 65 for 14 characters
'*******************************'
'This is where I want to write PRICE to cell i,7
Next i
I commented above where I want to put the 'price' variable, if someone could help me out that would be great.
Oh also, by all means if I'm not doing something the best way there is to do it, let me know! I'm definitely a noobie when it comes to this language.