+ Reply to Thread
Results 1 to 7 of 7

Command Button when pressed will incurease textbox value

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    50

    Command Button when pressed will incurease textbox value

    Hello planning a useform to collect data. My thought is to have a command button 1 when pressed will increase textboxA by a value of 1+

    Can somebody give me suggestions on how to start?

    Thank you in advance
    Gal403

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Command Button when pressed will incurease textbox value

    Hi

    Try this attached file
    Attached Files Attached Files
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  3. #3
    Registered User
    Join Date
    12-03-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Command Button when pressed will incurease textbox value

    Thank you Naveed!!. Its quite simple really.

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Command Button when pressed will incurease textbox value

    Glad i could help you

    If the suggestion helps you, then Click * to Add Reputation

  5. #5
    Registered User
    Join Date
    12-03-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Command Button when pressed will incurease textbox value

    Naveed, if initialize begins with a value = 0 or Null, the procedure doesn't work. I would prefer the form loads up with null value to the textbox. Any thoughts?

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Command Button when pressed will incurease textbox value

    Hmm ok,

    do one thing open the workbook and press Alt + F11 Double click on Userform and in Userform initialize change 1 to 0 then run

  7. #7
    Registered User
    Join Date
    12-03-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Command Button when pressed will incurease textbox value

    Code works if initial value is ("0") However, an error occurs if its = "" or = Null.

    Strange.. Anyway, ("0") will work for me. Thanks again.

+ 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] get a cells value to equal a textbox value when a button is pressed
    By grantastley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2012, 11:13 PM
  2. command button when pressed add the number 1, then 2, then 3 and so on
    By kateroe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2012, 08:28 AM
  3. Replies: 3
    Last Post: 05-07-2012, 09:46 PM
  4. Making one sheet visible once a Week or when command button is pressed
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2008, 04:34 PM
  5. How to limit the number of times a command button can be pressed
    By justchris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 06:23 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