+ Reply to Thread
Results 1 to 6 of 6

UserForm ListBoxes neither highlighting nor delivering the specified data

Hybrid View

  1. #1
    Registered User
    Join Date
    01-12-2013
    Location
    Barnstaple, England
    MS-Off Ver
    Excel 2007
    Posts
    11

    UserForm ListBoxes neither highlighting nor delivering the specified data

    First may I thank you for yesterday's answer which worked a treat.

    I have a userform which has 5 listboxes each as far as I can see identical except for ControlSource and RowSource. The RowSource values show correctly in the listboxes, but only 2 out of 5 listboxes highlight the chosen value and load that value to ControlSource. Any help to resolve this issue will be gratefully received, or guidance as how best to document the problem. I attach a jpeg view of the form. Black rings fail, green rings work as expected.

    Thank you

    David Eagles
    Attached Images Attached Images

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: UserForm ListBoxes neither highlighting nor delivering the specified data

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-12-2013
    Location
    Barnstaple, England
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: UserForm ListBoxes neither highlighting nor delivering the specified data

    Thank you Norie.

    Attached is the spreadsheet including the Macro and Userform. I am mostly self-taught so some of the code may appear crude, but it works - that is except for the listboxes highlighted in my original question.
    GiftAidState1 (='CONTROL'!B49), TAMReq (='CONTROL'!B45) return null values. PostOrCollect (='CONTROL'!B42), PaidBy (='CONTROL'!B9) and GiftAidState2 (='CONTROL'!B50)seem to work.
    GiftAidState2 also correctly highlights the appropriate choice.

    Again, thank you for your help.

    David Eagles
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: UserForm ListBoxes neither highlighting nor delivering the specified data

    David

    The reason the listboxes aren't highlighting is because you are using ControlSource.

    If you remove the ControlSource for all the listboxes then they should work properly.

    However you will then need to create code to write data from the userform to the sheet.

    I notice you are using ControlSource for most (all?) the controls on the userform and that all the control sources point to the 'Control' sheet.

    Is there a reason for that?

    What is the purpose of the sheet 'Control'? Is it some sort of 'staging' post you use before data gets transferred to another location?

  5. #5
    Registered User
    Join Date
    01-12-2013
    Location
    Barnstaple, England
    MS-Off Ver
    Excel 2007
    Posts
    11

    Thumbs up Re: UserForm ListBoxes neither highlighting nor delivering the specified data

    Dear Norie

    An immediate 'thank you'. I have never had any formal training in VBA and I use a 'CONTROL' worksheet as an intermediary between the userform and the data process having seen it done this way
    quite some years ago. I'm going to have a good think about what you have told me.

    David Eagles

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: UserForm ListBoxes neither highlighting nor delivering the specified data

    David

    No problem.

    If you need any further help just post back.

+ 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. Userform Dependant Listboxes
    By rck3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-26-2014, 07:40 PM
  2. Data Filter from Criteria Supplied from Listboxes on a Userform
    By Metserv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2012, 04:51 AM
  3. [SOLVED] Printout via Listboxes on UserForm
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-21-2012, 09:21 PM
  4. Delete data in listboxes then recall the data without unloading userform
    By Sal1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-11-2011, 06:37 PM
  5. Delivering Data Based on a table
    By joekrebs in forum Excel General
    Replies: 10
    Last Post: 12-11-2010, 06:35 PM
  6. Replies: 0
    Last Post: 09-10-2010, 04:58 AM
  7. exporting data from a userform using listboxes
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-09-2010, 11:52 PM
  8. Userform with 2 Listboxes
    By Mike R. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2005, 04:06 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