+ Reply to Thread
Results 1 to 7 of 7

How a textbox_enter can change a SpinButton?

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    75

    Unhappy How a textbox_enter can change a SpinButton?

    Hello,

    I have a form with a listbox. It has some properties and, using a "textbox_change", a array and a button "finish", I can save values to that properties in a sheet.

    To facilitate handling, without having to keep clicking all the time in the listbox, I created a SpinButton and it's working - I use spinbutton1_SpinUp and _SpinDown, ex:

    Please Login or Register  to view this content.
    However, I wish every time we type "enter", it goes to the next item on listbox. I tried, but I don't know how to call "_SpinDown" inside "Textbox1_enter()".

    There must be a better way to solve it.

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: How a textbox_enter can change a SpinButton?

    I have following idea:
    - extract your code from _SpinDown, _SpinUp to outside procedure like Sub S_Down, Sub S_Up and then call those procedures in place of your code you need it.

    Best Regards

  3. #3
    Registered User
    Join Date
    01-27-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: How a textbox_enter can change a SpinButton?

    I tried, but I can't solve the problem.

    Now I changed Spinbutton. It doesn't have Private Up or Down, but:

    Please Login or Register  to view this content.
    End Sub

    and
    Please Login or Register  to view this content.
    Last edited by marlonsaveri; 07-19-2011 at 03:48 PM.

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: How a textbox_enter can change a SpinButton?

    1) could you attach your workbook ? It's quite difficult to help when we are blind
    2) maybe you should tape textbox1.setfocus at the end of code in both procedures (Up, Down)

    MaczaQ

  5. #5
    Registered User
    Join Date
    01-27-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: How a textbox_enter can change a SpinButton?

    Thanks. I had forgotten to put .setfocus both. But, it's working junst each twice; when I click for the first one, it changes the listbox, but does't put the focus on textbox.

  6. #6
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: How a textbox_enter can change a SpinButton?

    please consider to attach your workbook with dummy data. It's realy hard to imagine how your whole code looks like and how your items (textbox, listbox etc.) are configured.

    If it is possible please attach workbook, then I will try to help you more...

    Best Regards

  7. #7
    Registered User
    Join Date
    01-27-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: How a textbox_enter can change a SpinButton?

    Here it is.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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