Results 1 to 3 of 3

Thread: References

  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    References

    I have a userform with two option buttons. I would like to specify the ControlSource of optionbutton1 to column "A" in a file called 'firms.xls'
    I would then do the same with optionbutton2 to column "A" in a file called 'clients.xls.'

    Any ideas? )

    Thanks!

    Drk.
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: References

    I'm looking for a way to specify a controlsource in the onclick event of the option button.. sorry that wasn't very clear..

    Thanks!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: References

    Hi Drk,
    You can set the controlsource for an optionbutton the same way you would a text box - e.g. me.optionbuttonname.controlsource = "A1"
    However, as far as I know, you cannot set the controlsource in the Click event of an option button and I don't think you can set it to a cell in another workbook. You can set it to another worksheet using .controlsource = "Sheet1!A1" for example.
    Hope that helps.
    PS It may be that I've just never found the correct syntax for referring to another workbook!
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •