+ Reply to Thread
Results 1 to 7 of 7

OptionButton Submit Error

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    OptionButton Submit Error

    Hi Guys,

    I'm getting an error with the code below.

    All I want is whatever option a user picks, "Good" "Neutral" or "Negative" to be moved to Sheet1 A B and C columns when the user presses submit.

    Appreciate your help and I've attached the spreadsheet as well.

    Thanks in advance

    Frank!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: OptionButton Submit Error

    Hi, Frank!,

    emptyRow is emnpty (showing 0, a row that doesn´t exist like that in any Excelösheet), and you miss an End If on each If-Statement like you´ve written it.

    Maybe try it like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    Re: OptionButton Submit Error

    Hi Holger,

    Thanks for helping me out and it works perfectly and I love the way you've grouped the text.

    I've changed it to go onto sheet 3 as that is where I need it.

    I have one little thing to be tinkered if possible.

    When I press submit the data for good goes to A1, when I choose negative the data goes to C3.

    Is there a way to determine the column so in this case negative would go to C2?

    Thanks again for your help.

    Frank

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: OptionButton Submit Error

    Hi, Frank,

    I´m not so sure I understood what you are asking as I can´t get the reason for placing negative into the same Column C but into row 2. My sample would add the data below any data in the sheet, you may make the ranges permanent by using the row number you want instead of emptyRow. Again: I´m sorry but I can´t pick up the idea why to place the sample value for negative into Row 2 instead of Row 3, perhaps you can clarify on that?

    Ciao,
    Holger

  5. #5
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    Re: OptionButton Submit Error

    Hi Holger,

    Apologies for not being clearer, i'll explain in more detail and hopefully you'll get what I mean

    So, the userform is to see team wellbeing within the team, to measure how people are feeling.

    If a user selects "Good" it should go into the next available space in column A, so A1 in this case, if another user also selects "Good" it should go into A3.

    If however the next user selects "Negative" it should find the next available space in column C, in this case, C2, if another user selects "Negative" it should go below that into C3.

    As I need to measure all of the input into a table that's why I would like to get rid of the spaces.

    If it can't be done it's no problem, just seeing if a genius, like yourself, can make it happen

    Thanks Holger

    Frank!

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: OptionButton Submit Error

    Hi, Frank,

    maybe like this :
    Please Login or Register  to view this content.
    Ciao,
    Holger

  7. #7
    Forum Contributor
    Join Date
    04-09-2014
    Location
    Derby
    MS-Off Ver
    Office 2013 - For my sins
    Posts
    122

    Re: OptionButton Submit Error

    Hi Holger,

    That is exactly what I wanted!!

    You are a star and a legend, reputation added thanks so much mate.

    I'll be posting soon again no doubt!!!

    Thanks again Holger.

    Frank

+ 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] VBA Submit Error
    By Frankinstyyn in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-15-2014, 08:13 PM
  2. OptionButton Error 424 - Object Required
    By Dante_Blake in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-12-2011, 04:04 PM
  3. Syntax for returning Optionbutton (Userform) caption (Error 438 with ctr.value)
    By asha3010 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-02-2011, 11:25 AM
  4. Create a Submit button save filename as A1, submit email unc path, etc.
    By briant97 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-30-2009, 09:52 AM
  5. Error 1004: Select method of OptionButton class failed
    By jrubin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2005, 08:51 PM

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