+ Reply to Thread
Results 1 to 3 of 3

code to save as tab delimited text

  1. #1
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    code to save as tab delimited text

    I'm trying to save a sheet as tab delimited text. Im using this code to ask for location and file name but wan to limit extension to tab delmited text format. I cant find the code to do that.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    16,323

    Re: code to save as tab delimited text

    1. Use xlText instead of vbTab
    2. Do not put it in quotes

  3. #3
    Forum Contributor
    Join Date
    03-10-2017
    Location
    USA
    MS-Off Ver
    office 2016
    Posts
    393

    Re: code to save as tab delimited text

    Thanks Jazzer, That worked great but it lead to another problem. Because I'm using filedialog it is selecting .xlsm extension for the name by dafault. The file is indeed a .txt file but it labeled it .xlsm so it gave an error saying it couldnt open it because the file format or extension is not valid ... in excel. Is there a way to have filedialog limit the extensions to just .txt? or have it not ask at all? I do need the ability to name it and select save location though. The simple solution is to always pick .txt but i know i have people who will use this who will not look at that.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA to Save a Single Sheet as a Tab Delimited Text File
    By mattmc419 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2014, 03:34 PM
  2. VBA Code to Save Excel File As Semi-Colon Delimited Format
    By mab1284 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2014, 09:52 AM
  3. Replies: 0
    Last Post: 11-24-2012, 02:31 AM
  4. save as pipe delimited text file.
    By aryam in forum Excel General
    Replies: 2
    Last Post: 04-13-2011, 11:14 AM
  5. Save Excel file as Tab-delimited text without quotes
    By markjh in forum Excel General
    Replies: 6
    Last Post: 10-06-2010, 01:52 AM
  6. Save as a pipe delimited text file
    By Jetheat in forum Excel General
    Replies: 5
    Last Post: 07-01-2010, 08:07 AM
  7. [SOLVED] Save as Text (tab delimited) problem
    By Prema in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2005, 10:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1