Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help With Very Simple Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Help With Very Simple Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help With Very Simple Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Help With Very Simple Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help With Very Simple Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Help With Very Simple Code

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help With Very Simple Code

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
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
Help with some simple code Angeline Excel Discussion (Misc queries) 4 October 12th 06 09:06 AM
Simple Code, I think... [email protected] Excel Worksheet Functions 1 August 2nd 06 08:09 PM
Some simple code WiReLaD Excel Programming 1 October 30th 03 07:11 PM
Simple For Each Next code Keith Willshaw Excel Programming 0 July 28th 03 12:57 PM
Simple For Each Next code Marek S. Excel Programming 0 July 28th 03 12:34 PM


All times are GMT +1. The time now is 01:53 AM.

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

About Us

"It's about Microsoft Excel"