Results 1 to 19 of 19

Rename a special filename

Threaded View

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    the Netherlands
    MS-Off Ver
    2016
    Posts
    56

    Rename a special filename

    I have a file with filename: 20151231-  Newyear -12471010.html
    A hyperlink to this file looks like: 20151231-%25F0%259F%258E%2587 Newyear %25F0%259F%258E%2587-12471010.html

    Now I want to rename this file. I tried:

    sub ChangeName()
    Dim FileName as string
    Filename= dir("20151231-*")
    name Filename as "Newyear.html"
    end sub
    But this fails , possible due to the fact that Filename becomes: 20151231- ?? Newyear ?? 12471010.html

    How to solve this problem?

    With kind regards

    Jan Lichtenbelt

    PS. Now with code tags. The question remains the same
    Last edited by Jan Lichtenbelt; 02-25-2016 at 03:10 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy a sheet, rename it by value in range then export product to new workbook and rename
    By MagicMan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2015, 07:24 PM
  2. [SOLVED] Input Filename to copy, rename and save to directory
    By Tellm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2014, 05:58 AM
  3. [SOLVED] Runtime 1004 after prompting for filename but not when filename hard coded.
    By cgoodenough in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-04-2013, 03:46 AM
  4. Replies: 2
    Last Post: 11-21-2013, 02:43 PM
  5. Copy Single Sheet From Multiple Books And Rename Using Source Filename
    By DeRo22 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2013, 12:09 PM
  6. Remove number and special characters from Filename
    By Elmholt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2012, 06:53 PM
  7. [SOLVED] To rename a workbook filename with the column value of a worksheet.
    By Vinutha in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-18-2012, 04:29 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