Hello all.
I'm trying to print (to the default printer) a screenshot of RUMBA 8.1 through the script editor but am running into an issue. The code is as follows:
Sub Main
Dim SYMBOL as string
Dim CUSIP as string
Dim SYM as string
Dim APrintear as string
Set XLApp = CreateObject("Excel.Application") ' Create an EXCEL application
XLApp.Workbooks.Open Filename:="C:\\Users\\a267482\\Desktop\\BHIS-GET CUSIP FROM SYMBOL.xlsx"
XLApp.Visible = True
Set MYBook = XLApp.Workbooks("BHIS-GET CUSIP FROM SYMBOL.xlsx")
Set XLSheet = MYBook.Worksheets("Sheet1")
EMSetCursor 1,19
EMSendKey "BSECFIND"
for x=1 to 1
SYMBOL=XLSheet.cells(x,1).value
EMSetCursor 2,25
EMSendKey "<DELETE>"
EMSendKey SYMBOL
EMSendKey "<ENTER>"
EMReadScreen SYM, 13, 7,9
If trim(SYM)=SYMBOL then
EMReadScreen CUSIP, 9, 6,9
XLSheet.cells(x,2).value="'"&CUSIP
else
XLSheet.cells(x,2).value="Cusip not found"
End if
EMSetCursor 2,25
Next x
End Sub
#Rumba