![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Nanaimo, BC
Posts: 49
|
I am trying to improve an excel sheet that i use to extract data from a dos program that runs in windows. As it stands, you have to press "Print Screen" in the dos window to copy the info from the program, alt-tab to the excel sheet which is running in the background and paste into the sheet. Afterwards you have to then alt-tab again to get back into the dos program. Is there any way to automate this task?
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Just subst "c:Autoexec.bat" for your File Sub GetInput_File() Dim Data Dim x As Integer Open "c:Autoexec.bat" For Input As #1 Do While Not EOF(1) Line Input #1, Data Cells(x + 1, 1) = Data x = x + 1 Loop Close 1 End Sub |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|