+ Reply to Thread
Results 1 to 7 of 7

Command Ok button Userform

  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Command Ok button Userform

    Hi
    Help! Sorry, my knowledge with the VBA is very minimal.

    I attached a sample file. When I click the button and fill the fields from the userform but when I click "OK", it does not appear in the worksheet accordingly.
    I have all the vba codes that I thought it will work.

    The checkbox is perfectly works, not problem on it.

    Also, if you can also fix the "Clear Entry" code and "UNDO" codes... please.

    Thank you.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Command Ok button Userform

    do you see what I did in the below images? all of these checks:
    Please Login or Register  to view this content.
    you are doing:
    Please Login or Register  to view this content.
    which results as:
    Please Login or Register  to view this content.
    it seems that excel finds that invalid. try:
    Please Login or Register  to view this content.
    as in image 3 below. you need a parent for textbox & (n+1). also, your code, IMO, is WAY too complex. the divisions and multiplications are not necessary whatsoever. it really should be a simple as this (common sense sample, not actual code):
    Please Login or Register  to view this content.
    Attached Images Attached Images

  3. #3
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: Command Ok button Userform

    Hi
    Wow! Can you add those codes in the sample worksheet and forward the updated worksheet. Like i said i have a minimal knowledge in vba codes. I don’t know what to do. Please... thank you

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Command Ok button Userform

    I will not fix your actual file, as that is quite a bit of work. I would require money for that. However, it is very easy to copy the attached example and do for yourself. Can you? It should be very easy, because what I am showing you here can be mirrored or replicated by you to do the very same thing for your file. I have given 2 examples of code that can be written. both are very simple and very similar. just 2-3 lines difference between the 2. let us know if you get stuck.
    Attached Files Attached Files

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Command Ok button Userform

    The only thing wrong with your OK button is that Textbox5 is actually called TextBo5 instead. Change that to TextBox5 and it should be OK.
    Rory

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Command Ok button Userform

    speaking to me, rorya? because that was his doing.

  7. #7
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,719

    Re: Command Ok button Userform

    Thank you.

+ 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. Replies: 6
    Last Post: 08-31-2017, 12:16 PM
  2. Command button on userform to unload another userform?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2017, 11:01 AM
  3. [SOLVED] Userform command button
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-12-2017, 04:10 PM
  4. Replies: 2
    Last Post: 02-02-2016, 10:27 PM
  5. [SOLVED] Run Command Prompt Icacls code in VBA Command Button on Userform
    By luismalave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2015, 11:40 PM
  6. UserForm Command button
    By aCmE in forum Word Programming / VBA / Macros
    Replies: 7
    Last Post: 01-10-2011, 11:53 AM
  7. Userform Command Button to open new userform
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2010, 12:02 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