Unicode+comma delimited VBA script

WhySoSerious

New Member
Joined
Jul 12, 2011
Messages
1
Hello, I have been creating simple macros in Excel before but now I have need for VBA script that would export sport results from excel table in comma delimited Unicode text file (later I just copy/paste it in the website and taking commas as dividers it creates table).
I have found this script, but I don't have the skills to create needed modifications.

Code:
Sub test()
  Dim txt As String, r As Range
  With Activesheet   
    For Each r In .Range("a1",.Range("a" & Rows.Count).End(xlUp))   
      With WorksheetFunction         
    txt = txt & vbCrLf & Join(.Transpose(.Transpose(r.Resize(,7).Value)),",")  
       End With   
Next
End With 
Open ThisWorkbook.Path & "\test.txt" For OutPut As #1    
Print #1, txt 
Close #1 
End Sub

What I need is output from columns A, B, C, AK, AL, AM and AN. Also, this script doesn't support Unicode. Is there possibility to tweak the code for my needs?

Thanks,
Harold.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,613
Messages
6,179,903
Members
452,948
Latest member
Dupuhini

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