Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba object calendar start date

I have 3 object calendars. the first one is activated by a comman
button, and then the 2nd is activated by selecting a date on the firs
calendar, and so on. I would like for the 1st calendar when activated
to start on the current date. then the 2nd calendar a month later.
and then the 3rd calendar a month later from the 2nd date. how do yo
do this? thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default vba object calendar start date

Hi

Calendar1.Value = Date
In the first control

In the second
Calendar1.Value = DateSerial(Year(Date), Month(Date) + 1, Day(Date))

in the third
Calendar1.Value = DateSerial(Year(Date), Month(Date) + 2, Day(Date))



--
Regards Ron de Bruin
http://www.rondebruin.nl


"crew3407 " wrote in message ...
I have 3 object calendars. the first one is activated by a command
button, and then the 2nd is activated by selecting a date on the first
calendar, and so on. I would like for the 1st calendar when activated,
to start on the current date. then the 2nd calendar a month later.
and then the 3rd calendar a month later from the 2nd date. how do you
do this? thanks


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba object calendar start date

thanks!!

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba object calendar start date

sorry, one more thing. I think I might not have been clear enough, or
don't know where to put the code.

when i activate the calendar, i want it to start on the current date
but then i want to be able to select a different date. this date tha
i select i am putting it into a cell in the sheet.

sub commandbutton1_click()
userform1.show
end sub

sub calendar1_click()

range("A1").value = calendar1.value
userform1.hide
userform2.show

end sub

this is how my code looks right now, so i want to be able to set th
calendar1.value initially as today's date, but then be able to chang
it and have the date that i select to go into the range. Hopefull
this is clear? Thanks

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default vba object calendar start date

See

http://www.rondebruin.nl/calendar.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"crew3407 " wrote in message ...
sorry, one more thing. I think I might not have been clear enough, or I
don't know where to put the code.

when i activate the calendar, i want it to start on the current date,
but then i want to be able to select a different date. this date that
i select i am putting it into a cell in the sheet.

sub commandbutton1_click()
userform1.show
end sub

sub calendar1_click()

range("A1").value = calendar1.value
userform1.hide
userform2.show

end sub

this is how my code looks right now, so i want to be able to set the
calendar1.value initially as today's date, but then be able to change
it and have the date that i select to go into the range. Hopefully
this is clear? Thanks.


---
Message posted from http://www.ExcelForum.com/





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
Calculating monthly start date with a start date Monique Excel Worksheet Functions 3 December 20th 08 09:50 AM
Object Calendar 11.0 Pat Excel Discussion (Misc queries) 1 January 9th 07 10:10 PM
cannot start the source application for this object WORD USER Excel Discussion (Misc queries) 0 August 16th 06 04:24 PM
use of calendar object? CathyZ Excel Discussion (Misc queries) 1 May 4th 06 07:14 PM
Object Calendar 8.0 braziliandude Excel Programming 1 February 3rd 04 03:47 PM


All times are GMT +1. The time now is 02:35 PM.

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"