+ Reply to Thread
Results 1 to 15 of 15

importing results from a checkbox

  1. #1
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    importing results from a checkbox

    I'm working with a macro to import specific cell data from many single standardised excel files into a master file.

    Problem im having is with these single files contain "Yes" or "No" checkboxes and i require the answer (either yes or no) to pull through into the master file.

    Is this possible as the checkboxes aren't physically in the cell, is there perhaps a simpler way im missing?

    inserted current code below (only relevant sections included)

    Please Login or Register  to view this content.
    Last edited by Gti182; 02-28-2014 at 12:03 PM.

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

    Re: importing results from a checkbox

    Are the checkboxes linked to cells?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    they are not linked no. they are simple form control checkboxes

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

    Re: importing results from a checkbox

    You'll need to use the Shapes collection of the worksheet(s) to get the values if the checkbox(es).

    PS Forms chevkboxes can have linked cells.

  5. #5
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    that sounds interesting Norie, can you elaborate a bit more not following 100%

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

    Re: importing results from a checkbox

    This will loop through all the shapes on Sheet1, if they are checkboxes it will output their value - 1 for checked and -4146 for unchecked.
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    thats awesome! Ok i see how it works now but a bit unsure on how to incorporate it into my code, any tips?

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

    Re: importing results from a checkbox

    I don't really know too much about the sheets you are dealing with but if you always want the values from specific checkboxes you coudl use there names.
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    ok i follow that, inserted the above code but getting a runtime error -2147024809 (80070057) the item with the specified name was not found

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

    Re: importing results from a checkbox

    Have you checked the name?

    Is it definitely a Forms checkbox?

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  11. #11
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    template file attached.

    not sure how to check the checkbox name
    Attached Files Attached Files

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

    Re: importing results from a checkbox

    Select the checkbox and it's name will appear in the name box next to the formula bar.

  13. #13
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    great, see it now

  14. #14
    Forum Contributor
    Join Date
    10-04-2010
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    469

    Re: importing results from a checkbox

    i put a space between Check and Box works 100% now thanks so much for the help!

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

    Re: importing results from a checkbox

    Glad it worked.

+ 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. VBA Excel checkbox results with If statement not correct
    By chaz1010 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2014, 06:15 AM
  2. importing website results into excel
    By yijun_6 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2013, 10:02 AM
  3. Importing data to Excel and assiging the macro to Checkbox
    By TallOne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2012, 11:28 AM
  4. Return a string from multiple checkbox results
    By dillinger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2010, 11:46 AM
  5. Importing checkbox data from web page
    By Linda Ellison in forum Excel General
    Replies: 0
    Last Post: 04-18-2006, 01:46 PM

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