Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Take various screenshot using macro and save in disk
Hi,
I have always received best support from this community... THANKS! I am not sure is this the right place to ask the question, but i caanot stop myself as its very important for me... I have a excel code which starts an external application and pulldata from the external application and pastes it in the excel sheet. Please look at the code below and help me know that, can i take screenshot of the screens of external application and save them in hard disk. Public myobj As Object Sub MyLogOn() Set myobj = CreateObject("BPGUMAS.UMAS") With myobj .Logon ("C:\Accessw\accessw.exe ssbhost.acw") If .GETERRMSG < "" Then MsgBox .GETERRMSG .LogOff Set myobj = Nothing End End If End With End Sub Sub MyLogOff() With myobj ' .LogOff If .GETERRMSG < "" Then MsgBox .GETERRMSG Else MsgBox "Logoff was Successful" End If End With Set myobj = Nothing End Sub Sub GetFactor() Dim i As Integer, strTemp As String MyLogOn i = 1 'Sheets("factors").Range("B5:E1000").ClearContents With myobj Do .FUNC = "BGOV" .BGOV.cusip = Range("cusip").Offset(i, 1) ..Browse strTemp = .GetScreen(1) data_one = Trim(Mid(strTemp, 82 + 10, 8)) data_two = Trim(Mid(strTemp, 91 + 10, 15)) data_three = Trim(Mid(strTemp, 322 + 10, 8)) data_four = Trim(Mid(strTemp, 331 + 10, 15)) data_five = Trim(Mid(strTemp, 562 + 10, 8)) data_six = Trim(Mid(strTemp, 571 + 10, 15)) data_seven = Trim(Mid(strTemp, 802 + 10, 8)) data_eight = Trim(Mid(strTemp, 811 + 10, 15)) Range("cusip").Offset(i, 2) = data_one Range("cusip").Offset(i, 3) = data_two Range("cusip").Offset(i, 4) = data_three Range("cusip").Offset(i, 5) = data_four Range("cusip").Offset(i, 6) = data_five Range("cusip").Offset(i, 7) = data_six Range("cusip").Offset(i, 8) = data_seven Range("cusip").Offset(i, 9) = data_eight i = i + 1 Loop Until Range("cusip").Offset(i, 0) = "" End With MsgBox ("Done") End Sub Thanks! Boss |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save a file to disk without re-formating the disk | Excel Discussion (Misc queries) | |||
How to save to my floppy disk? | New Users to Excel | |||
VBA to save a web page to local disk | Excel Discussion (Misc queries) | |||
how to get disk icon on save button of save as dialog like 2000 | Excel Discussion (Misc queries) | |||
How do I save an excel folder to disk? | New Users to Excel |