Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save a file to disk without re-formating the disk Frustrated Mike Excel Discussion (Misc queries) 2 February 19th 09 07:33 PM
How to save to my floppy disk? Doreen New Users to Excel 2 December 14th 06 11:45 PM
VBA to save a web page to local disk Ron Excel Discussion (Misc queries) 0 April 26th 06 05:18 PM
how to get disk icon on save button of save as dialog like 2000 RichT Excel Discussion (Misc queries) 2 March 9th 06 08:13 PM
How do I save an excel folder to disk? Cookie New Users to Excel 5 February 23rd 05 10:24 PM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"