Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have a userform with textbox3 and textbox4. The user can insert a startdate in textbox3 and insert an enddate in textbox4. The code below fills cells B10 and below with the dates between the startdate and enddate and the weekends are excluded. The only problem is that by excluding the weekends the enddate automatically changes to a later date. What should I change to get the enddate as last date in column B and still exclude the weekends? Thanks in advance! Code: -------------------- Range("B10").Select With Selection .Value = CDate(TextBox3.Text) .NumberFormat = "dd/mm/yyyy" .AutoFill .Resize(CDate(TextBox4.Text) - CDate(TextBox3.Text) _ + 1), Type:=xlFillWeekdays End With -------------------- -- leonidas ------------------------------------------------------------------------ leonidas's Profile: http://www.excelforum.com/member.php...o&userid=35375 View this thread: http://www.excelforum.com/showthread...hreadid=566534 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
UserForm to insert new data | Excel Discussion (Misc queries) | |||
Insert dates from a userform | Excel Programming | |||
Insert a date from a userform | Excel Programming | |||
Insert a date from a userform | Excel Programming | |||
Insert row if box on userform is checked | Excel Programming |