paste below code in VBA window
----------------------------------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/15/2007 by DPS
Dim R As Integer
Dim strName As String, lngBasic As Long
Open "c:\ExcelTxt.txt" For Output As #1
For R = 2 To 300
Range("A" & R).Select
strName = ActiveCell.FormulaR1C1
Range("B" & R).Select
lngBasic = ActiveCell.FormulaR1C1
Print #1, strName, lngBasic
'REMOVE BELOW LINE AND CHECK RESULT FILE
Write #1, strName, lngBasic
Next R
Close #1
MsgBox "OK"
End Sub
------------------------------
Regards
Ketan N Sharma
|