+ Reply to Thread
Results 1 to 9 of 9

Export Cells to Text and automatically have File Name and File Type Selected

  1. #1
    Registered User
    Join Date
    09-22-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2011
    Posts
    39

    Export Cells to Text and automatically have File Name and File Type Selected

    What I am trying to accomplish is saving a range of cells to a text file titled "CONTENT" but I want the user to decide where to save the file. I currently have a code that exports the cells to a file and a save as box pops up - the user then has to title the file, select file type and where to save the file - I'd like to have the file name and file type already selected. Hope that makes sense. Below is the code I am currently using. Any and all help is greatly appreciated. Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    Hi,

    Change to this line :

    Please Login or Register  to view this content.
    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    09-22-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2011
    Posts
    39

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    Thanks so much for your reply!! I tried this and all it seems to do is resave my whole excel file. I am on Excel on a Mac. Could that be an issue?

    Than

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    You are welcome. I don't know about mac version, but you can try to debug the code with this :

    Please Login or Register  to view this content.
    Is the box show the expected full path name ?

  5. #5
    Registered User
    Join Date
    09-22-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2011
    Posts
    39

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    It does the same thing as before, just saves my current excel file. No box pops up. Here is where I plugged it into my code. Maybe I'm not placing it in the correct spot?

    Please Login or Register  to view this content.

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    The code is working fine here in my windows PC.
    After googling, I find that for mac version, the "Filefilter" parameter is not available.
    I modify the code based on Ron de Bruin code here : link
    but I cannot test it, since I don't use mac.

    Please look at it, and tell me how does it go :

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-22-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2011
    Posts
    39

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    Thanks!! It does have a save as window pop up and Content is filled in for the file name but the file type is not set to text. Is there a way for that to happen?

    Thank you!!

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    You are welcome. Unfortunately, from what I've got from googling, that is not possible on mac (I cannot test it).

    Regards

  9. #9
    Registered User
    Join Date
    09-22-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2011
    Posts
    39

    Re: Export Cells to Text and automatically have File Name and File Type Selected

    Ok. No worries. Thanks for the help!

+ 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. Save as macro that specifies file type, file location and takes file name from three cells
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-13-2013, 10:09 PM
  2. [SOLVED] Macro to create text file and write contents of selected cells to the file
    By m@cro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2013, 10:21 AM
  3. How to automate export for a range of cells to text file
    By gshock in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2008, 12:37 PM
  4. [SOLVED] Why can't I Export selected cells to tab-delimited text file?
    By Lisa B. in forum Excel General
    Replies: 2
    Last Post: 11-28-2005, 01:40 PM
  5. [SOLVED] Export an excel file as text without change of document type
    By Michael in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2005, 11:06 AM

Tags for this Thread

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