1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Radio button cell linkage

Discussion in 'Business Applications' started by Peanut_, Jul 17, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. Peanut_

    Peanut_ Thread Starter

    Joined:
    Jul 5, 2007
    Messages:
    11
    Hi,
    Is there some way to link option buttons (radio buttons) to a cell, so that if i copy-paste the cell, the cell linkages of the pasted buttons update automatically to the new cell?
    Currently I set the cell linkage from Format > Control > Cell linkage. And I've tried leaving the $-signs out when entering the cell value, but this won't work....

    Thanks for your help!
     
  2. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    What program are you talking about? Access? Excel?
     
  3. Peanut_

    Peanut_ Thread Starter

    Joined:
    Jul 5, 2007
    Messages:
    11
    Excel.
    Sorry for not mentioning that :p
     
  4. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    Try this. Embed an option button into a cell (actually, it resides on top of the cell), go to Insert, Hyperlink and select the linkage you want. From what I was able to do, you can then either copy and paste or cut and paste the option button and it will retain the link.
    If you do this, it will write the code for OptionButton1 (or whatever you name your button)
    Private Sub OptionButton1_Click()

    End Sub
     
  5. Peanut_

    Peanut_ Thread Starter

    Joined:
    Jul 5, 2007
    Messages:
    11
    Hi,
    Thanks for your response, Slurpee, but that was not quite what I was after.
    I'll try to explain myself more clearly.

    When I speak of linking the button to a cell, I mean that the value of the cell depends on the status of the button. For example unchecked => cell value 0, checked => cell value 1. And using this cell value I can perform other stuff in my template.
    The other alternative would be assigning a macro for the buttons, but the template I am doing requires many++ buttons, and each of these should be linked to different cells (each button linked to the cell its embeded in). So I'm trying to avoid having to change the cell linkages manually.
    Hmm. Not sure if I was much clearer this time. Hopefully you got what I am after....?
     
  6. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    You can use the "Form" toolbar to add a checkbox or radio/option button to a form. Double-click on the form tool you added and have it link to a certain cell using the select cells button (red arrow pointing to the blue cell). From here select the cell you want it to link to.

    This is an on/off button or true/false however you want to look at it. It will allow you to count the number of whichever value as well.

    I personally would make an access database which makes field creation a whole lot simpler and easier to use.
     
  7. Peanut_

    Peanut_ Thread Starter

    Joined:
    Jul 5, 2007
    Messages:
    11
    Thanks for your response.
    I know how to link a checkbox/radiobutton to a cell (double-click > Control). The problem is that if the checkbox is placed on and linked to cell A1, and I want a identical checkbox for A3, if I try to use copy-paste, so that a box is located in cell A3, the cell linkage remains to the original cell A1.
    My document would contain a whole lot of those boxes, so I wouldn't wanna be changing the cell linkages manually.... :rolleyes:
    Hmm. I'm afraid my access skills are not good enough for this. Maybe I'll have to come up with some other solution.
     
  8. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    You can import the excel spreadsheet into Access if it is a clean list. The data type you will need for the checkboxes will be yes/no and it will automatically create them for you.

    If you need futher assistance feel free to Personal Message me or submit a reply and I will walk you through it step by step.
     
  9. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Picking up from slurpee's comments. Re: "I set the cell linkage from Format > Control > Cell linkage" suggests that you're trying to use option buttons from the Forms toolbar. You can't link those to individual cells anyway, unless you're going to surround them with group boxes.
     
  10. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    The cut and paste method won't work because it is meant to copy the data in the button (or a cell or anything like that), in this case the data is the hyperlink. Perhaps someone with good VBA skills could figure out a fairly easy way to copy the code to reassign the link values, but....
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/596838

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice