View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default help with vba code please

Try this and let me know if you have problems:
' Code written 8/24/2006 by CChickering for Mona

Sheets("summary").Range("A1").AutoFilter Field:=1, Criteria1:="="
& UserForm1.TxtBox1, _
Operator:=xlAnd, Criteria2:="<=" & UserForm1.TxtBox2

Sheets("summary").Range("A1").CurrentRegion.Specia lCells(xlCellTypeVisible).Copy
_
Sheets("results").Range("A1")
Sheets("summary").Range("A1").AutoFilter


Charles

Mona wrote:
I have a form created in VBA. I have a txtbox1 = begin date and txtbox2 =
end date. On this form I also have an OK button

On worksheet "summary" I have rows of data by date. Date is in A4:A500.

I would like assistance is writing the code in the "OK" procedure that will
copy data from SUMMARY based on input date range(txtbox1 and txtbox2) and
paste into worksheet "results".

thank you