+ Reply to Thread
Results 1 to 3 of 3

Macro to name sheet with imported .CSV file name

  1. #1
    Registered User
    Join Date
    11-04-2008
    Location
    UK
    Posts
    11

    Macro to name sheet with imported .CSV file name

    I'm working on a sheet to analyse data in .CSV format, sofar I can import the .CSV file correctly, however I would like the Macro to name the sheet with same name as the .CSV file.

    As i'll be importing multiple .CSV files.
    The code I have sofar is:

    Please Login or Register  to view this content.
    I hope somone can help me.

    Thanks

    Michiel
    Last edited by MichielEngineer; 11-10-2008 at 05:01 AM.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573
    Use InsStrRev().

    Of course you will need to iterate the sheet names to see if it exists. You would also need to verify that the filename is a valid sheet name.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-04-2008
    Location
    UK
    Posts
    11
    Thank you very much
    this has helped, and this is the code i ended up with:

    Please Login or Register  to view this content.
    (now i just need to make sure that the filenames are no longer than 31 caracters and don't contain / \ etc.)

    Again many thanks.
    Michiel

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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