+ Reply to Thread
Results 1 to 8 of 8

CommandButton and FIND fails

  1. #1
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    CommandButton and FIND fails

    Haven't done a LOT with forms, but this should work (in my mind) and doesn't.

    I'm using a ComboBox linked to a named range of "DATES" for a user to select a date. All I want to do is find that date in column A of the Sheet1.
    Please Login or Register  to view this content.

    Eventually I'm going to link all the text boxes to the sheet1 data and let them load up the existing value by date, make changes, then save them back to the original location.

    But it ain't working and I'm scratching my head.

    I really just need the red or the blue code to return a value so I know what row to take from/send to, I can take it from there, but right now they both come up empty.

    Thanks in advance for the assist.
    Last edited by JBeaucaire; 09-16-2009 at 05:20 PM. Reason: Sheet removed...see below for latest version
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: CommandButton and FIND fails

    Hi JBeaucaire
    have a look at these two values
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: CommandButton and FIND fails

    FWIW when looking for dates in a Match I generally use the CLng(date) as the criteria.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: CommandButton and FIND fails

    Does this work for you..
    Please Login or Register  to view this content.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: CommandButton and FIND fails

    No, none of that helps. Try clicking on the form button, selecting the first date in the list, then clicking the LOAD FROM DATABASE button. Nothing ever works.

    I've also tried NOT formatting the selection in the Date1 box, leaving it as raw datevalue, no help.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: CommandButton and FIND fails

    This works for me

    Please Login or Register  to view this content.
    Although US date format may need a change to the dd-mmm-yyyy mask.
    Cheers
    Andy
    www.andypope.info

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: CommandButton and FIND fails

    Very strange both work this end
    What results did you get in the immediate window?

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: CommandButton and FIND fails

    Quote Originally Posted by Andy Pope
    Although US date format may need a change to the dd-mmm-yyyy mask.
    The tweak to date format in the other sub did the trick. Thanks Andy!

    And thanks all for helping me. Very frustrating the *little* things, huh? Here's the finished utility if your interested
    Attached Files Attached Files
    Last edited by JBeaucaire; 09-16-2009 at 05:42 PM. Reason: Sheet v.03 updated

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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