+ Reply to Thread
Results 1 to 3 of 3

Marco to import csv from browse location and rename current sheet without spaces or dashes

  1. #1
    Registered User
    Join Date
    04-29-2014
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    47

    Marco to import csv from browse location and rename current sheet without spaces or dashes

    hello,

    I'm trying to use a macro button to import a CSV from a browse location dialog box, then name the current worksheet the imported file name with the spaces and dashes replaced with underscores. So when I export the sheet it saves as a new file name with the spaces and dashes replaced with underscores.

    Every thing works as it should until I get to replacing the spaces and dashes with underscores.

    This is my current import code


    Please Login or Register  to view this content.

    and the code for my export button is


    Please Login or Register  to view this content.
    Any advice would be appreciated.
    Last edited by gutterball; 05-23-2014 at 09:42 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Marco to import csv from browse location and rename current sheet without spaces or da

    Hi..

    Replace this:
    Please Login or Register  to view this content.
    With this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-29-2014
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2013
    Posts
    47

    Re: Marco to import csv from browse location and rename current sheet without spaces or da

    That is beautiful, thank you!

+ 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. Replies: 7
    Last Post: 03-03-2016, 11:38 AM
  2. [SOLVED] macro to import .csv to new sheet and rename it
    By vivek_work in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-06-2013, 11:02 PM
  3. Replies: 5
    Last Post: 08-13-2012, 05:49 AM
  4. import file from another sheet - location problem
    By j_r_m_c in forum Excel General
    Replies: 1
    Last Post: 02-19-2011, 03:38 PM
  5. How do I assign a variable to the curent work sheet?
    By accelerator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-04-2005, 11: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