+ Reply to Thread
Results 1 to 6 of 6

Using combobox to replicate database operations in a user form

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Using combobox to replicate database operations in a user form

    Hello - new user to both the forum and VBA here.

    I'm trying to use a combobox on a user form to find then change data in an excel sheet. Basically the functioning will be the same as the MS userform however not everyone that will use the form will be able to access the MS form easily and it requires typing which I'm trying to restrict ( by using combo's).

    So I'm trying to replicate that form but have drop down boxes to change the cell values. I've been at this for 2 days so far and have searched far and wide to find a solution by hacking bits and pieces of code together. This is what I have so far:

    Please Login or Register  to view this content.
    On opening the form the combobox1 defaults to todays date (which is cell AC1). On running the find routine it presents the correct data, once a new date is selected from combo1 and the find routine run it gives a "Not listed" message box (as it should if it cant find the right result). The data it should be looking at is in A2:A32 on the same sheet.

    Finding the right data is the first issue - changing and writing it to the correct cells will be the next one

    I'm unable to attach the file, too big and sensitive information etc.....

    Any responses much appreciated.

    Regards
    Kranky

  2. #2
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Using combobox to replicate database operations in a user form

    Ok sorted the first issue ( dates not being found) by setting the formats the same. Simple really.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Using combobox to replicate database operations in a user form

    Got some working code happening, this is the full thing:
    Please Login or Register  to view this content.
    here's a screen shot of the form:
    Screenshot.jpg

    however: Once the form is unloaded then loaded again it cannot find anything from ComboBox1. Is there anything I need to do to fix this?

    The code for command Button 2 is horribly slow by the way.

    Regards

    Kranky

  4. #4
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Using combobox to replicate database operations in a user form

    Opened this spreadsheet this morning and no go. The search function is simply not working and I dont know why.

    The only thing that has changed is the day itself overnight. this particular sheet has no references to anything else in the workbook other than one cell with TODAY(). This book does have about 130 named ranges and I'm sure none of them reference dates, aside from which there is only one named range on this sheet which is the dates.

    Does anyone see an issue with this code?
    Last edited by Kranky; 09-27-2012 at 02:16 AM.

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Using combobox to replicate database operations in a user form

    Well have since built another that works (for a different form),
    Please Login or Register  to view this content.
    works first time every time but just can't adapt it to this application. Would really appreciate any guidance what so ever.

  6. #6
    Registered User
    Join Date
    09-24-2012
    Location
    Perth, WA
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Using combobox to replicate database operations in a user form

    Date handling issue which I'd presumed it was. My inelegent solution is:
    Please Login or Register  to view this content.
    thanks for everyones input

+ 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