Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Combobox with current date

Hi,
I have 3 combo boxes that corresponds to day, month and year. When the user
opens my form, those values should be automatically with the current day,
current month and current year, but also open to change it.
I can make the values to be changeable, but i can´t set those current date
values.
I tried with no success all of those below:

With insereForm
.Show
.ComboDay1.Value = Format(Now, "dd")
.ComboDay1.Value = Format(Date,"dd")
.ComboDay1.Value = Day
End With

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Combobox with current date

What about this?

..ComboDay1.Value = Day(Now)

Rick


"bbussoloti" wrote in message
...
Hi,
I have 3 combo boxes that corresponds to day, month and year. When the
user
opens my form, those values should be automatically with the current day,
current month and current year, but also open to change it.
I can make the values to be changeable, but i can´t set those current date
values.
I tried with no success all of those below:

With insereForm
.Show
.ComboDay1.Value = Format(Now, "dd")
.ComboDay1.Value = Format(Date,"dd")
.ComboDay1.Value = Day
End With


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Combobox with current date

..ComboDay1.Value = Day(Now) doesn´t work either. I even tried to set the
focus first, but no good.



"Rick Rothstein (MVP - VB)" escreveu:

What about this?

..ComboDay1.Value = Day(Now)

Rick


"bbussoloti" wrote in message
...
Hi,
I have 3 combo boxes that corresponds to day, month and year. When the
user
opens my form, those values should be automatically with the current day,
current month and current year, but also open to change it.
I can make the values to be changeable, but i can´t set those current date
values.
I tried with no success all of those below:

With insereForm
.Show
.ComboDay1.Value = Format(Now, "dd")
.ComboDay1.Value = Format(Date,"dd")
.ComboDay1.Value = Day
End With



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Combobox with current date

On 23 Nov., 19:45, bbussoloti
wrote:
.ComboDay1.Value = Day(Now) doesn´t work either. I even tried to set the
focus first, but no good.

"Rick Rothstein (MVP - VB)" escreveu:



What about this?


..ComboDay1.Value = Day(Now)


Rick


"bbussoloti" wrote in message
...
Hi,
I have 3 combo boxes that corresponds to day, month and year. When the
user
opens my form, those values should be automatically with the current day,
current month and current year, but also open to change it.
I can make the values to be changeable, but i can´t set those current date
values.
I tried with no success all of those below:


With insereForm
.Show
.ComboDay1.Value = Format(Now, "dd")
.ComboDay1.Value = Format(Date,"dd")
.ComboDay1.Value = Day
End With- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


Try

.ComboDay1.AddItem Day(Now)

Regards

Per
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Combobox with current date

Exactly what is the ComboBox populated with and how did you populate it? And
which ComboBox are we talking about... on the worksheet from the Forms
Toolbar, on the worksheet from the Control Toolbar or on a UserForm from
within VBA?

Rick


"bbussoloti" wrote in message
...
.ComboDay1.Value = Day(Now) doesn´t work either. I even tried to set the
focus first, but no good.



"Rick Rothstein (MVP - VB)" escreveu:

What about this?

..ComboDay1.Value = Day(Now)

Rick


"bbussoloti" wrote in message
...
Hi,
I have 3 combo boxes that corresponds to day, month and year. When the
user
opens my form, those values should be automatically with the current
day,
current month and current year, but also open to change it.
I can make the values to be changeable, but i can´t set those current
date
values.
I tried with no success all of those below:

With insereForm
.Show
.ComboDay1.Value = Format(Now, "dd")
.ComboDay1.Value = Format(Date,"dd")
.ComboDay1.Value = Day
End With






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Combobox with current date

Hi,

Try this one hopes it works

ComboBox1.Value = Format(Now, "dd")
ComboBox2.Value = Format(Now, "mm")
ComboBox3.Value = Format(Now, "yyyy")

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Figuring Vacation Hrs. Earned using Current Date minus Hire Date Sharon Excel Worksheet Functions 6 May 3rd 07 10:32 PM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM
Current time Current date. yo beee Excel Programming 3 July 22nd 04 03:41 AM


All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"