Results 1 to 7 of 7

Recorded macro for date format is different with the recording process

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Recorded macro for date format is different with the recording process

    I macro record when I do this manually :
    select a cell with a date value
    custom format it to "d/mm/yyyy"
    stop the macro.

    The resulting code is :
    Selection.NumberFormat = "d\/mm\/yyyy"

    I thought the result would be:
    Selection.NumberFormat = "d/mm/yyyy"
    The other thing is when the manual custom format process is "dd-mm-yyyy",
    the resulting code is :
    Selection.NumberFormat = "d/mm/yyyy"
    Maybe someone can explain it to me why the result is like that ?
    Thank you in advanced.

    My computer Short Date setting is : dd-MMM-yy
    Last edited by karmapala; 06-24-2020 at 02:43 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Recorded macro does other than while recording
    By HvLbeheer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2017, 11:22 AM
  2. Add If condition to a code recorded by Macro recording function in Excel
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2014, 01:36 AM
  3. Recorded Macro changing date format
    By cindywylie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 03:56 PM
  4. [SOLVED] How to revised macro code to repeat the recorded task without recording several times?
    By reimar_rem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2013, 01:34 AM
  5. Recording Macro to generate scatter plot: Plot from Macro different from recorded.
    By VaPiano in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2012, 05:41 AM
  6. [SOLVED] Date format when using Text Input Wizard and recording a macro
    By Dave H. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2006, 12:55 PM
  7. [SOLVED] Recorded Macro to Copy Format
    By Lilbit in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2006, 05:45 PM

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