![]() |
![]() |
|
|||||||
| 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
Posts: 17
|
I need to add a quote to the beginning of numbers in 2 columns ie 2 becomes "2. and then need to insert the column a1..a50 into the text
[wait app] "3 =a1 [tab field] "2 [enter] [wait app] =b1 [erase eof] [enter] [wait app] y [enter] Then output the whole text to text file. Any ideas... |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Wellington
Posts: 104
|
Try the following:
Sub OutputFile() Open "c:iFileName.txt" For Output As #1 Print #1, "[wait app]" Print #1, """" & "3" Print #1, "=a1" Print #1, "[tab field]" Print #1, """" & "2" Print #1, "[Enter]" Print #1, "[wait app]" Print #1, "=b1" Print #1, "[erase eof]" Print #1, "[Enter]" Print #1, "[wait app]" Print #1, "y" Print #1, "[Enter]" For i = 1 To 50 Print #1, Range("A1").Offset(i - 1, 0).Value Next i Close #1 End Sub Hope it helps |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|