+ Reply to Thread
Results 1 to 6 of 6

Button Counting on user form

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    Chaska, MN
    MS-Off Ver
    Excel 2010
    Posts
    24

    Button Counting on user form

    Hello,

    I am trying to count the current button presses on a userform. I have a forwards and backwards button that I would like to add or subtract to a count and based upon this count show or hide information. Where can I look for examples? I know I will have to pass information between a private and public sub but I am unsure of how to do it.

    Thank you,

  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,198

    Re: Button Counting on user form

    Hi, QAChaska,

    for each activatting of the UserForm on it´s own or in it´s entity? What are you trying to show/hide? If you can please attach a sample of the workbook for us to have a detailed look.

    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 Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Button Counting on user form

    believe you asking for something like attached file
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    11-12-2013
    Location
    Chaska, MN
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Button Counting on user form

    Quote Originally Posted by humdingaling View Post
    believe you asking for something like attached file
    Thank you that was what I needed.

  5. #5
    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,198

    Re: Button Counting on user form

    Hi, humdingaling,

    I´d call your public variable a module wide variable but it´s not needed:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Button Counting on user form

    Hi Holger

    wasnt sure there would be a textbox to "hold" the value as such
    i just added the textbox for easy visualization

    but yes you are right you can do that method and keep it localised
    have label or textbox to hold the value

    Cheers
    Hum

+ 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] User Form - Hyperlink Button within a Form, to create a Link on a Designated Cell
    By Sinalk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2013, 07:29 AM
  2. [SOLVED] Counting checkboxes on a user form
    By coach.32 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 06:25 AM
  3. VBA User Form - Linking Close Button and Cancel Button
    By nivassrii in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2011, 07:05 AM
  4. User Form button
    By lapot in forum Excel General
    Replies: 0
    Last Post: 06-07-2007, 06:06 AM
  5. User form x button
    By Greg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2006, 12:00 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