ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   referencing inputbox input to worksheet (https://www.excelbanter.com/excel-programming/387629-referencing-inputbox-input-worksheet.html)

SDH

referencing inputbox input to worksheet
 
I have the following code
Private Sub cmdUpdateSummary_Click()
Dim StartDate As Date
Dim EndDate As Date
StartDate = InputBox("Enter Starting Date Please", StartDate)
EndDate = InputBox("Enter Ending Date Please", EndDate)
End Sub

Can anyone tell me how i can collect the dates in between those entered from
a worksheet and place them on a new worksheet?

Norman Jones

referencing inputbox input to worksheet
 
Hi SDH,

Yoo could use Excel's Advanced Filter to extract and copy
the data to the required sheet.

Try turning on the macro recorder while you perform the
requisite steps manually. This will provide you with base
code which may be edited to render it more generic and to
replace the date criteria with the results of your input boxes.

If you are not familiar with the Advanced Filter, see
Debra Dalgleish's tutorial at:

Excel -- Filters -- Advanced Filters -- Introduction
http://www.contextures.com/xladvfilter01.html


---
Regards,
Norman


"SDH" wrote in message
...
I have the following code
Private Sub cmdUpdateSummary_Click()
Dim StartDate As Date
Dim EndDate As Date
StartDate = InputBox("Enter Starting Date Please", StartDate)
EndDate = InputBox("Enter Ending Date Please", EndDate)
End Sub

Can anyone tell me how i can collect the dates in between those entered
from
a worksheet and place them on a new worksheet?





All times are GMT +1. The time now is 12:25 PM.

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