+ Reply to Thread
Results 1 to 6 of 6

Find input box value

  1. #1
    Forum Contributor
    Join Date
    01-30-2014
    Location
    England
    MS-Off Ver
    MS Office 2010, 2007, 2003
    Posts
    149

    Find input box value

    Hi all

    I'm trying to make part of a macro that will find user input.

    User starts macro, is prompted to enter a date, and macro will find the date.
    Problem is, the code I've used does not want to work for me.

    I've tried Dim/Set, For Each/Next, and the below:
    Please Login or Register  to view this content.
    Does anyone know what I'm doing wrong, please?

    Thank you
    Last edited by Aaron092; 08-05-2014 at 09:54 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Find input box value

    tried cdate(date1 = InputBox("Enter date", "Enter Date"))

    if not can you attach a sample.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Forum Contributor
    Join Date
    01-30-2014
    Location
    England
    MS-Off Ver
    MS Office 2010, 2007, 2003
    Posts
    149

    Re: Find input box value

    Hi Nathansav

    Thanks for your reply. I've tried that method too - knew I was missing one.
    I've attached a copy of the spreadsheet to this. I'm trying to find dates within the highlighted row.
    The rows and headers don't change, just the values

    Thanks
    Copy of 1408 (2).xlsm

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Find input box value

    Range("Y:Y").Find(CDate(InputBox("EnterDate")), After:=Range("Y2"), LookIn:=xlValues, _
    LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False, SearchFormat:=False).Activate

  5. #5
    Forum Contributor
    Join Date
    01-30-2014
    Location
    England
    MS-Off Ver
    MS Office 2010, 2007, 2003
    Posts
    149

    Re: Find input box value

    Nathansav, you absolute stallion! Works beautifully!
    Thank you so much - reputation given

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Find input box value

    No worries, it was your look after Activecell that was the issue.

    I'd also trap errors in case the find string isnt found.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. find and input with to criteria
    By gjergji in forum Excel General
    Replies: 1
    Last Post: 01-11-2013, 08:42 PM
  2. [SOLVED] Find and Input with criteria
    By gjergji in forum Excel General
    Replies: 9
    Last Post: 09-20-2012, 08:19 PM
  3. Find Date and input row
    By Challenged_Mind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2012, 01:41 AM
  4. find and input data
    By mickeynmh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2008, 10:52 AM
  5. [SOLVED] find user input
    By BorisS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-19-2006, 01:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1