Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Wierd Date listbox behaviour

I have two date listboxes, a FROM and a TO, so the user can select a date
range. The dates start 10/1/09 and continue until today. If I select a date
range greater than 26 days, I get an error message on the paste command. I'm
using this same paste command in several other listboxes without a problem.
The code is as follows:

Windows(cstrDBfile).Activate
Set ws = Sheets("DCI data")
ws.Activate
ws.Range("$b$6").Activate
ws.Range("b6").AutoFilter field:=2, Criteria1:="=" &
CDate(lstFrom), Criteria2:="<=" & CDate(lstTo)

'Copy the query results to the Query tab in this workbook

ActiveSheet.Cells.Select
Selection.Copy
ActiveSheet.Range("a1").End(xlDown).Offset(1, 0).Select
Me.Activate
ActiveWorkbook.Sheets("QueryDate").Select
Range("$a$16").Select
Selection.PasteSpecial Paste:=xlPasteValues, operation:=xlNone,
skipblanks _
:=False, Transpose:=False

Any help will be appreciated.
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
Cell Date and Listbox Date formats Corey[_3_] Excel Programming 5 December 12th 08 11:52 AM
Date Picker Behaviour lrjanzen13 Excel Programming 0 January 23rd 08 01:23 AM
Wierd Bug with Format Date VBA??? [email protected] Excel Programming 5 January 12th 07 03:12 AM
Different date behaviour in different computers Hari[_3_] Excel Programming 0 September 14th 04 07:16 PM
date in listbox Gilbert Aponte Excel Programming 1 September 4th 03 08:26 AM


All times are GMT +1. The time now is 06:30 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"