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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
format the sheet cell as dd-mmm
 
Upvote 0
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
 
Upvote 0
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..
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

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
Back
Top