Closed Thread
Results 1 to 3 of 3

Creating an Option list using VBA Excel, need help with fixing this code please

  1. #1
    Registered User
    Join Date
    06-02-2013
    Location
    south africa
    MS-Off Ver
    Excel 2010
    Posts
    18

    Creating an Option list using VBA Excel, need help with fixing this code please

    i have written the following code within the userform1 module, the code is to display 3 options using an option list and then display the data into the spreadsheet, however the data doesnt get displayed onto the sheet, some insight into this problem will be highly appreciated thank you very much!!

    code Private Sub CommandButton1_Click()
    Unload UserForm1
    End Sub

    Private Sub Frame1_Click()

    Dim thechoice As String
    '
    If Me.OptionButton1 Then
    thechoice = "1"
    ElseIf Me.OptionButton2 Then
    thechoice = "2"
    ElseIf Me.OptionButton3 Then
    thechoice = "3"
    Else
    thechoice = "4"
    End If
    ActiveCell.Offset(0, 2).Value = thechoice
    End Sub /code

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Creating an Option list using VBA Excel, need help with fixing this code please

    And how does this differ from your other thread, submitted 17 minutes earlier?

    Pete

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Creating an Option list using VBA Excel, need help with fixing this code please

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    http://www.excelforum.com/excel-prog...de-please.html
    Thread Closed.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

Closed 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