Robert, Find the attached excel file for your macro. There is one limitation that you have to enter the date in a specific format ie. mm/dd/yyyy or m/d/yyyy or m/d/yy or mm/dd/yy
Manish -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Rjorg Sent: Saturday, November 01, 2008 3:58 AM To: MS Excel & VBA Macros Subject: $$Excel-Macros$$ Find Date Macro Hi, I am trying to create a macro that searches for a specific date in a sheet with many dates. I would like a textbox to come up and ask what date to look for. After inserting the date in the text box up I get an error. Do you know what I need to change to get it to look up the date that was input? Dim c As String c = Application.InputBox("What date are you looking for?", Type:=1) Cells.Find(What:=c, After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ SearchFormat:=False).Activate Thanks, Robert --~--~---------~--~----~------------~-------~--~----~ Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To post to this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/excel-macros?hl=en Visit & Join Our Orkut Community at http://www.orkut.com/Community.aspx?cmm=22913620 Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com To see the Daily Excel Tips, Go to: http://exceldailytip.blogspot.com -~----------~----~----~----~------~----~------~--~---
Book1.xls
Description: MS-Excel spreadsheet
