+ Reply to Thread
Results 1 to 9 of 9

How to remove special characters in filenames when saving?

  1. #1
    Registered User
    Join Date
    10-18-2022
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    9

    Cool How to remove special characters in filenames when saving?

    Hi all, I would like to delete any special characters of a filename before saving, however, it seems I have missed something.....
    Can anyone please help?






    Thanks!

    TT77
    ..VBA Newbie[ATTACH]801073
    Attached Files Attached Files
    Last edited by TT77; 10-18-2022 at 12:36 AM. Reason: Add information

  2. #2
    Registered User
    Join Date
    10-18-2022
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    9

    Cool Re: How to remove special characters in filenames when saving?

    Just need a simple code to delete all special characters in the filenames before saving.

    Any other suggestions also welcome.

    Thank you
    Last edited by TT77; 10-18-2022 at 12:39 AM.

  3. #3
    Registered User
    Join Date
    10-18-2022
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    9

    Re: How to remove special characters in filenames when saving?

    Attached the code in txt format Thanks
    Last edited by TT77; 10-18-2022 at 12:37 AM.

  4. #4
    Registered User
    Join Date
    10-18-2022
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    9

    Re: How to remove special characters in filenames when saving?

    I think I missed a save function.

    Thanks Alan, you already made 20,000 posts!!
    Last edited by TT77; 10-18-2022 at 12:40 AM.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2310 Win 11 Home 64 Bit
    Posts
    23,136

    Re: How to remove special characters in filenames when saving?

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    21,881

    Re: How to remove special characters in filenames when saving?

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-18-2022
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    9

    Re: How to remove special characters in filenames when saving?

    Hi, jindon, thank you so much for the code!

    I want to make it as part of a process before Activeworkbook.SaveAs I tried to paste the function but it does not work.

    Will something like the attached work?

    ThanksReplace special characters before save.txt

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    21,881

    Re: How to remove special characters in filenames when saving?

    Function should remain intact.
    then call it like
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-18-2022
    Location
    Hong Kong
    MS-Off Ver
    2010
    Posts
    9

    Re: How to remove special characters in filenames when saving?

    Thank you very much. How will you make an independent macro to loop all files in a folder, remove all special characters in the filenames?

    Thanks!!

+ 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. Remove special characters using VBA
    By renjer.ranjeet in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-22-2018, 07:40 AM
  2. [SOLVED] how remove all special characters except # , & - .
    By Latha Mani in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 01-13-2014, 07:14 AM
  3. [SOLVED] Remove ALL Special Characters
    By hutch@edge.net in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-14-2013, 08:12 PM
  4. Remove special characters
    By humacdeep in forum Excel General
    Replies: 6
    Last Post: 01-14-2012, 03:36 PM
  5. Remove Special Characters
    By bkatzman in forum Excel General
    Replies: 10
    Last Post: 04-13-2010, 11:51 AM
  6. Remove special characters from cell
    By jowilla442 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2009, 01:01 AM
  7. Problem running macros in Excel filenames containing special characters like []
    By rlaemmler@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-13-2005, 11:05 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