Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
Is this me just being simple or what? I cant seem to get this piece of code to work. I have on hidden row bu it is below the autofilter range. I am alos using a form create through Data Form Dim rng As Range Dim strDate As String Sheets("Telephone Stats").Select strDate = Application.InputBox("Please enter date you require dat for", "Manager Checks") Selection.AutoFilter Field:=7, _ Criteria1:="=" & CLng(CDate(strDate) -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well, you've got Criteria1:="="
HTH, Greg "pauluk " wrote in message ... Hi All, Is this me just being simple or what? I cant seem to get this piece of code to work. I have on hidden row but it is below the autofilter range. I am alos using a form created through Data Form Dim rng As Range Dim strDate As String Sheets("Telephone Stats").Select strDate = Application.InputBox("Please enter date you require data for", "Manager Checks") Selection.AutoFilter Field:=7, _ Criteria1:="=" & CLng(CDate(strDate)) --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No this is fine.
Criteria:="=" & CLng(CDate(strDate)) the "=" indicates that it has tob equal to what is placed in the inpu box. i.e. less than or equals is <= Even if i take this out or change from short integer to long on data i shown. If i do this manually the data shows. So help pleas -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put in a msgbox to see what CLng(CDate(strDate)) is returning
"pauluk " wrote in message ... No this is fine. Criteria:="=" & CLng(CDate(strDate)) the "=" indicates that it has tob equal to what is placed in the input box. i.e. less than or equals is <= Even if i take this out or change from short integer to long on data is shown. If i do this manually the data shows. So help please --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When i check the data it is returning the correct information.
I.e. when i put 07/04/2004 that is the search it is doing just that n info appears. This data does exisit on the sheet because it is my tes data. I have tried this on two machines and two versions of excel excel200 (which will use it) and excel 200 -- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try performing the steps manually with the macro recorder on and see if
Excel is using the format you expect. If you like, send me the workbook to look at. Regards, Greg "pauluk " wrote in message ... When i check the data it is returning the correct information. I.e. when i put 07/04/2004 that is the search it is doing just that no info appears. This data does exisit on the sheet because it is my test data. I have tried this on two machines and two versions of excel excel2000 (which will use it) and excel 2002 --- Message posted from http://www.ExcelForum.com/ |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is really starting to annoy me, I just dont know why and what
wrong with i -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with some simple code | Excel Discussion (Misc queries) | |||
Simple Code, I think... | Excel Worksheet Functions | |||
Some simple code | Excel Programming | |||
Simple For Each Next code | Excel Programming | |||
Simple For Each Next code | Excel Programming |