4 Replies - 15177 Views - Last Post: 01 August 2010 - 11:11 PM Rate Topic: -----

#1 mavs19  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 16-September 08

how to add date to a combo box?

Post icon  Posted 16 September 2008 - 07:48 PM

Please help on how to add date (with complete format) to a combo box...
Is This A Good Question/Topic? 0
  • +

Replies To: how to add date to a combo box?

#2 thava  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 180
  • View blog
  • Posts: 1,606
  • Joined: 17-April 07

Re: how to add date to a combo box?

Posted 17 September 2008 - 01:24 AM

simple
formatString ="your format"
combobox1.additem(format(now,formatstring))


Was This Post Helpful? 1

#3 akhileshbc  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 9
  • View blog
  • Posts: 179
  • Joined: 27-September 08

Re: how to add date to a combo box?

Posted 28 September 2008 - 12:08 AM

Private Sub Form_Load()
Combo1.AddItem CStr(Date)
End Sub

Will this help you..????:)
Was This Post Helpful? 0
  • +
  • -

#4 Guest_Nikhil*


Reputation:

Re: how to add date to a combo box?

Posted 01 August 2010 - 10:57 AM

Sorry but aftr using codee given by- akhileshbc.................it only gives today's date n doesnt giv days from 1-31 or month as jan-dec 0r year from 1990-2010.

how can we do this???????
Was This Post Helpful? 0

#5 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: how to add date to a combo box?

Posted 01 August 2010 - 11:11 PM

Ahhh... Simple. Type in format and Press F1. When help appears, read about the format function and then click on the see also link at the top of the article. First, when the dialog appears, select Named Date/Time Formats (Format Function) after reading that, click on See Also once again and select User-Defined Date/Time Formats (Format Function). Or if you really want to get fancy and use the FormatDateTime Function that the Format function calls...



Good Luck
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1