+ Reply to Thread
Results 1 to 5 of 5

copy data to worksheet from an OptionButton

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    3

    copy data to worksheet from an OptionButton

    hi,

    ive been given a task at work that means ive had to add a form to an excel spread sheet.
    its for logging enquires. its a really simple job.
    at the moment ive got it working so it stores the values from some text fields [see code below] in a table.

    Please Login or Register  to view this content.
    i need to add some optionBoxes [and a drop down later] so they can choose between 'yes', 'no' and 'na'.
    ive added the option buttons and grouped them. however i cant work out how to store the info like im doing with the text buttons.

    i tried ws.Cells(iRow, 9).Value = Me.english.Value [where 'english' is the name of the group] but this didnt work.

    does any one know the correct way to do this?
    Last edited by jeffreybrown; 01-24-2013 at 01:55 PM. Reason: Please use code tags...Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: copy data to worksheet from an OptionButton

    try this link, it has a comprehensive guide to forms, I used it to learn how to do exactly what you are asking

    http://www.fontstuff.com/ebooks/free/fsUserForms.pdf

  3. #3
    Registered User
    Join Date
    01-24-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: copy data to worksheet from an OptionButton

    thanks but the syntax they use in your example is totally different to the one used in my example so i wont be able to use it. i dont know vb and i dont have the time to learn...
    i need to do something like:

    ws.Cells(iRow, 9).Value = Me.english.Value

    where 'english' is the name of the group of radio buttons.
    Last edited by eXcelIsNice; 01-24-2013 at 01:56 PM.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: copy data to worksheet from an OptionButton

    Moderators Note:
    • Please follow Forum Rule #3 and use code tags.
    • Added this time, but please use them in the future…Thanks.
    HTH
    Regards, Jeff

  5. #5
    Registered User
    Join Date
    01-24-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: copy data to worksheet from an OptionButton

    hiya,

    a little disappointed that no one got back to me on this but ive come up with a solution if any one wants to see.

    i just cycle threw the values of the buttons checking if any are selected in which case they would be set to 'true' and if they are i set the value accordingly.

    like so:

    Please Login or Register  to view this content.

    so checking values from text boxes and then from a radio box would look something like this:

    Please Login or Register  to view this content.

+ 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