Need to create macro for other program

jtswanny

New Member
Joined
Mar 19, 2002
Messages
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...
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top