bpy
bpy

Reputation: 1180

open csv as txt file from excel with vba

I tried to open a csv file as txt format from a VBA macro like this without success:

Open "F:\MyPlace\Content\1 - IMPORTER.csv" For Output As #1

My goal is to open this file, (as stated) outside the excel. Just like you open a txt file.

Would this be possible? How?

Upvotes: 0

Views: 1311

Answers (1)

Joe Beck
Joe Beck

Reputation: 431

Give this a try, please:

Sub WHATEVER()
    CreateObject("Shell.Application").Open ("C:\Users\beckj\whatever.txt")
End Sub

Upvotes: 1

Related Questions