how to change excel datepicker format

gomzi

New Member
Joined
May 9, 2020
Messages
5
Office Version
  1. 2007
Platform
  1. Windows
i am using excel 2007.i am unable to change the date format after selecting the date from date picker as shown in the image. i tried to change the format by right clicking the excel cell but still not working. i am not that expert in visual basic but still i can do if i get any suggestion. visual basic code written is as follows

VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  With Sheet2.DTPicker1
    .Height = 20
    .Width = 20
    If Not Intersect(Target, Range("a13:l28")) Is Nothing Then
      .Visible = True
      .Top = Target.Top
      .Left = Target.Offset(0, 1).Left
      .LinkedCell = Target.Address
     Else
      .Visible = False
    End If
  End With
End Sub
 

Attachments

  • IMG_20200510_072453.jpg
    IMG_20200510_072453.jpg
    87 KB · Views: 7
Last edited by a moderator:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
format the sheet cell as dd-mmm
 

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows

ADVERTISEMENT

is the value number
 

gomzi

New Member
Joined
May 9, 2020
Messages
5
Office Version
  1. 2007
Platform
  1. Windows
is the value number
I customed format the cell by right clicking as you mentioned dd-mmm but not working. Whereas without datepicker normal date its working. But date selection by datepicker not working. After selecting date by datepicker format is dd-mm-yyyy
 

gomzi

New Member
Joined
May 9, 2020
Messages
5
Office Version
  1. 2007
Platform
  1. Windows
is the value number
Yes its working now but i observed that specified format not changing instantly after selection of date from datepicker. I need to click 2 times simultaneously on the particular cell and then if i click anywhere in excel sheet, desired format showing..
 

Watch MrExcel Video

Forum statistics

Threads
1,129,890
Messages
5,638,865
Members
417,056
Latest member
Romera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top