ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert a date from a userform (https://www.excelbanter.com/excel-programming/368517-re-insert-date-userform.html)

Bob Phillips

Insert a date from a userform
 

With Worksheets("Sheet1").Range("B10")
.Value = CDate(TextBox1.Text)
.AutoFill .Resize(CDate(TextBox2.Text) - CDate(TextBox1.Text) + 1)
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"leonidas" wrote in
message ...

Hi,

I have a userform with 2 textboxes. In textbox1 a "from" date should be
entered by the user and in textbox2 a "to" date should be entered.
When I click commandbutton1 (=OK) the "from date should be inserted in
cell B10 and all the dates between the "from" and the "to" date should
be inserted in the cells below.
I only don't know how to do this. Can someone help me? Thanks in
advance!


--
leonidas
------------------------------------------------------------------------
leonidas's Profile:

http://www.excelforum.com/member.php...o&userid=35375
View this thread: http://www.excelforum.com/showthread...hreadid=565510





All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com