+ Reply to Thread
Results 1 to 7 of 7

Help to do event when click choose option button on Form

  1. #1
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Help to do event when click choose option button on Form

    Hi all

    I have workbook with sheet(Main, Resouce, Result)

    In sheet(Main) I have Form with 03 option button. Now I want macro to do that:
    When I choose one of 03 option on Form will clear all cells in sheet(result) and add ("A1)"value = "Branch", ("B1").value = "Code"

    - If I choose option1 will copy data like:
    sheet(resource).range(A2, lastrow).copy to sheet(result).range(A2)
    sheet(resource).range(B2, lastrow).copy to sheet(result).range(C1) and transpose
    Then Call macro "check"
    - If I choose option2 will copy data like:
    sheet(resource).range(C2, lastrow).copy to sheet(result).range(A2)
    sheet(resource).range(D2, lastrow).copy to sheet(result).range(C1) and transpose
    Then Call macro "check"
    - If I choose option3 will copy data like:
    sheet(resource).range(A2, lastrow).copy to sheet(result).range(A2)
    sheet(resource).range(C2, lastrow).copy to sheet(result).range(last row, 1)
    sheet(resource).range(B2, lastrow).copy to sheet(result).range(C1) and transpose
    sheet(resource).range(D2, lastrow).copy to sheet(result).range(1, lastcolumn) and transpose
    Then Call macro "check"

    I attachment file below to clear my idea, sheet(result_when check All) this mean when I choose option3
    Please help me./.
    Attached Files Attached Files

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Help to do event when click choose option button on Form

    Try the attached file.
    Attached Files Attached Files
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Help to do event when click choose option button on Form

    @ Mumps1,

    You beat me to it AGAIN. Watch your step!

    Even your Avatar shows how fast you are.
    Unfortunately, your sample Workbook works just fine!

    Kind regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Help to do event when click choose option button on Form

    @Winon

    Got lucky. Your avatar looks pretty speedy to me!!!

  5. #5
    Forum Contributor
    Join Date
    10-29-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    142

    Re: Help to do event when click choose option button on Form

    Great code @mumps1. Your code very diffrience with I thinking when start that using select case

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Help to do event when click choose option button on Form

    Hello sbv1986,

    We appreciate your feedback and kind consideration of adding Reputation+ to those who have contributed to the solving of your issue!

    Kind regards.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Help to do event when click choose option button on Form

    Glad it worked out.

+ 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. [SOLVED] Help - Choose a option in listbox then uptades another form
    By rssmith93 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-11-2016, 12:51 PM
  2. Macro to click a 'choose file' button on webpage, browse for a local file, and click open
    By Insaintime32 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-06-2016, 04:46 PM
  3. Running the code in an option button from a seperate normal button click
    By camikhazi in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 01-22-2016, 10:54 AM
  4. [SOLVED] Form button on click event not trigerring
    By Umair.711 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-16-2014, 01:24 PM
  5. [SOLVED] Choose the same option for all lists with a button
    By HugoRibeiro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2013, 11:31 AM
  6. How can I display message box when I choose option button (form control0
    By sumonrezadu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2012, 10:51 AM
  7. Call button click event from a button on anther sheet
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-25-2010, 09:27 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