When trying to print from the sheet 'CashonHand' I get a error 400. The rest of code works fine without this one line. I googled but unable to find a way to make it work.
TIA, Dennis
TIA, Dennis
Code:
Sub nw()
Dim afile As String
afile = "c:\temp\temp1\nw.txt"
If Len(Dir$(afile)) > 0 Then Kill afile
Dim str As String
str = "A15,A12,M12,F6,G6,H6,I6"
spl = Split(str, ",")
Open "c:\temp\temp1\nw.txt" For Append As #1
For x = 0 To 6
Print #1, ActiveSheet.Range(spl(x)).Text
Next x
[I][B] Print #1, ActiveWorkbook.Worksheets("CashonHand").Range(“B489”).Text[/B][/I]
Close #1
ChDir ("C:\Dennis\Software\LapBatch\uploading")
Shell ("C:\Dennis\Software\LapBatch\uploading\nwUpload.bat")
End Sub