+ Reply to Thread
Results 1 to 14 of 14

Help With Macros Tied To Buttons

  1. #1
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Help With Macros Tied To Buttons

    Good afternoon, Gurus!

    I apologize that this query is going to be as vague as it will be, but I'm at a loss for better words.

    I've attached a workbook (stripped of sensitive info) that has macros assigned buttons on two of its tabs: "Perfect Attendance Summary" and "Print Out." I've been tasked with generally fixing this workbook as after many years a misuse, a lot got messed with. I'm able to fix the Excel formulas for the most part, but a large part of it's primary function is the two tabs I've mentioned, but they use macros, and you could fill an ocean with all I DON'T know about VBA. I was wondering if someone might be able to take a look at them, and help me figure out what exactly they're "supposed" to do, why they're not working now, and, mostly importantly, hopefully assist in fixing them.

    Thank you in advance for any help anyone is able to provide.

    Thank you!
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by Mvaldesi View Post
    ...figure out what exactly they're "supposed" to do, why they're not working now
    If you don't know what they're supposed to do, how do you know they are not working? We need a little more to go on. If you don't know where you are going, you will definitely get there.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Help With Macros Tied To Buttons

    Besides that the people in your example are going to be busy this weekend in Bahrain, its like Jeff said.
    The code seems to be from the macro recorder, a tremendous amount of selecting, so it would need to be cleaned up anyway.
    Find somebody that used it before it quit working and ask him/her what it should do and start over.
    Experience trumps academics every day of the week and twice on Sunday.

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Help With Macros Tied To Buttons

    It is better for you (also for helpers here) is:
    - Start again from zero
    - Point out what data is raw data, and what data is expected outcome (from formula, VBA code,...): Before and After
    Quang PT

  5. #5
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by 6StringJazzer View Post
    If you don't know what they're supposed to do, how do you know they are not working? We need a little more to go on. If you don't know where you are going, you will definitely get there.
    According to the end users, they're "not working," and as I'd never seen or used it before, yet I was referred to them as someone who could help. Sadly, none of them can articulate what exactly is "broken." I found a few formulas I was able to clean up, but the macros have been a hard stop for my expertise.

  6. #6
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by jolivanes View Post
    Besides that the people in your example are going to be busy this weekend in Bahrain, its like Jeff said.
    The code seems to be from the macro recorder, a tremendous amount of selecting, so it would need to be cleaned up anyway.
    Find somebody that used it before it quit working and ask him/her what it should do and start over.
    Lol, yes, they'll all be busy in Bahrain, and I can't wait! I used their names as "dummy" inputs for the purposes of posting the workbook here, but nice catch!

    And I wish I could find someone who's used it before it quit working, but what started out as a uniform template across multiple facilities got modded and manipulated into multiple versions, so we've got a tower of Babel situation where no one is speaking the same language. And of course, the priginal author is no longer with the company.

  7. #7
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by bebo021999 View Post
    It is better for you (also for helpers here) is:
    - Start again from zero
    - Point out what data is raw data, and what data is expected outcome (from formula, VBA code,...): Before and After
    Your first bullet is exactly what we're trying to avoid, and as to your second, it depends on who you ask as you can see in my response to jolivanes above. The intent for my fixing it was to get everyone on the same page again, but in some cases, it seems they're not even reading the same book...

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help With Macros Tied To Buttons

    Before I even looked at the code, I decided that this file is not very well designed. The formula reference paths are needless convoluted, and I still can't figure out the ultimate purpose. If you have any hope at all of making this useful you have to work with the people who use and understand how they expect to use it. Without an explanation of the business process and rules intended here, I can't complete it. For example, what are "Points"? The How To sheet is a very good explanation of what data the user is supposed to enter, but there is nothing that explains the logic for how the results are calculated or what they mean.

    But I tried to do some cleanup.

    The form that says "be patient" is modal so once it is shown nothing else can happen until it is closed. Fixed.

    Data on Perfect Attendance Summary has merged cells. Terrible idea. Unmerged cell and converted Range to a Table.
    Same for Print Out.

    Fixed formulas to use structured references and prevent error conditions.

    Converted relative references in formulas to absolute where appropriate

    Corrected sheet name Occurences to Ocurrences

    Corrected Assocaite to Associate on Summary headings

    Last Accountability Issue Date: cell on Print Out refers to cells with no data so I have no idea what this is supposed to do. Expiration date has as similar problem.

    As jolivanes notes, the code has macro recorder bloat and does not use good practices.

    Code changed to eliminate selecting sheets and operating on ActiveSheet.

    This is a work in progress so is not yet in a finished state. I wanted to give you an idea of my progress. Do not run the macros yet until I'm done, because I have not yet revised all range references to match the sheet changes I did. But feel free to review code.

    I went through the code and did not see anything that looked like an outright error, so I am still back where we started. We don't know how the behavior is different than what it's supposed to do, so we can't make it do what it's supposed to do.

  9. #9
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: Help With Macros Tied To Buttons

    Wow, thank you very much! I'll take a look at it and see if it makes better sense with your improvements. Again, thank you!
    Last edited by 6StringJazzer; 03-02-2023 at 01:05 PM. Reason: no need to quote an entire post when replying directly to it

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help With Macros Tied To Buttons

    OK it works. But I can't say for sure that this is exactly what you want it to do.

  11. #11
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help With Macros Tied To Buttons

    I am dying to know if this helped.

  12. #12
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by 6StringJazzer View Post
    I am dying to know if this helped.
    I am SO sorry; I have email notifications set up to let me know when someone responds to this thread, but I swear I didn't see one for your reply! I got the notification for your most recent reply, though, and I see you offered your help 3 WEEKS ago. Thank you so much, I will send your version over to the end users to see if it is working now.

    Again, I'm truly sorry I didn't see your help from 3-2-2023 until just now!

  13. #13
    Forum Contributor Mvaldesi's Avatar
    Join Date
    01-21-2011
    Location
    Plano, TX
    MS-Off Ver
    MS365 (PC) v.2108
    Posts
    259

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by 6StringJazzer View Post
    I am dying to know if this helped.
    Hello, 6StringJazzer!

    I finally got some feedback from the end users on your suggested fix, and unfortunately, according to them, it's still not doing what they need it to do. I've tasked them with painstakingly detailing EXACTLY what they want from these pages, so maybe I can try and recreate something similar and less clumsy in the revised version of the attendance tracker I (with the help of several Gurus here) made for them. For now, I'm just going to mark this thread "solved" and will re-open a new one once I have more concrete feedback to try these tabs again.

    Thanks again for your efforts, and again, my deepest apologies for not seeing your response sooner.

  14. #14
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Help With Macros Tied To Buttons

    Quote Originally Posted by Mvaldesi View Post
    according to them, it's still not doing what they need it to do
    That, of course, was the fear all along.

    Hopefully they can define what they do want it to do. Best of luck.

+ 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. Macros with buttons, spin buttons, scroll buttons, etc.
    By qqbbppdd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2013, 09:34 AM
  2. Can ALL option buttons within a frame be tied together for common THEN
    By teacher_rob in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-13-2011, 04:00 PM
  3. Object buttons tied to Frame
    By larry711 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2009, 02:06 PM
  4. [SOLVED] Macros And Buttons
    By [email protected] in forum Excel General
    Replies: 6
    Last Post: 08-08-2006, 05:45 PM
  5. [SOLVED] Macros And Buttons
    By [email protected] in forum Excel General
    Replies: 0
    Last Post: 08-08-2006, 04:20 PM
  6. [SOLVED] Buttons and macros?
    By Joe in forum Excel General
    Replies: 3
    Last Post: 10-06-2005, 10:05 PM
  7. [SOLVED] buttons & macros
    By Jock W in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-30-2005, 03:06 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