#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DTPicker


Dear freinds,

hi

I have DTPicker1 and DTPicker2 on my userform through these i copy data
from Sheet1 for a specific period to paste data sheet2. The following
codes i am using

Private Sub CommandButton1_Click()

Worksheets("sheet1").Select
Dim x As Long
Dim y As Long
y = 1
For x = 1 To 65536
If Cells(x, 1).Value = CDate(DTPicker1) And Cells(x, 1).Value <=
CDate(DTPicker2) Then
Sheets("sheet2").Cells(y, 1).Value = Cells(x, 1).Value
Sheets("sheet2").Cells(y, 2).Value = Cells(x, 2).Value
Sheets("sheet2").Cells(y, 3).Value = Cells(x, 3).Value
y = y + 1
End If
Next x
End Sub

I am copying data only from one sheet1 through DTPickers to paste into
Sheet2. My question is if i have two sheets i.e sheet1 and sheet2
having date field at col A in each sheet . What would be the code to
copy data from sheet1 and sheet2 to paste into sheet3 using same
DTPicker1 and DTPicker2.

Thanks

SYED HAIDER ALI


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
View this thread: http://www.excelforum.com/showthread...hreadid=560430

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Size bug with DTPicker Zorro[_3_] Excel Programming 0 May 11th 06 08:40 PM
can you use the dtpicker in an userfrom TerryR Excel Worksheet Functions 1 August 1st 05 03:20 PM
dtpicker problem Hekke Excel Discussion (Misc queries) 0 July 19th 05 04:39 PM
REPOST: Looking for how to use DTPicker Newbie1[_3_] Excel Programming 1 April 5th 04 10:46 PM
DTpicker problem Cody Dawg[_2_] Excel Programming 2 October 21st 03 04:53 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"