referencing inputbox input to worksheet

G

Guest

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?
 
N

Norman Jones

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top