+ Reply to Thread
Results 1 to 11 of 11

I'm having trouble with some macros and I don't know if I need to combine them or edit?

  1. #1
    Registered User
    Join Date
    04-16-2024
    Location
    Muscatine, Iowa
    MS-Off Ver
    MS 365 subscription V.2401
    Posts
    6

    I'm having trouble with some macros and I don't know if I need to combine them or edit?

    I have to copied and pasted two macros to my spreadsheet attached to control buttons.

    One control button "save as" the active workbook to a specific folder on my shared drive under a name specified by two cells on the spreadsheet. The workbook is an "end of shift" report for supervisors and will be saved to the folder 3 times a day.

    The other button copies the spreadsheet into a PDF and attaches it to an email.

    I copied these from some videos I watched and made the appropriate adjustments to fit my spreadsheet. I in no way know how to write a macro.

    I realized after getting done it would be better to attach the newly saved file to the email instead of a PDF because then the next supervisor can just take the already filled out end of shift report and edit any changes that occurred on their shift and use the "save as" control button again to create a new workbook for their shift.

    I don't know if I make edits to the "save as" control button to just have it also attach the newly created workbook to an email, or

    If I edit the email control button to grab the newly saved workbook from the folder on the shared drive and send it.

    The two macros I used will be pasted below. I would greatly appreciate any help from the experts here.

    Thank you!

    -----------------------------------------------------------------------------------------------------------------------------------------------------

    Please Login or Register  to view this content.
    -----------------------------------------------------------------------------------------------------------------------------------------------------

    Please Login or Register  to view this content.
    Last edited by Asphixion; 04-16-2024 at 12:59 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,990

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    Administrative Note:

    Welcome to the forum.

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-16-2024
    Location
    Muscatine, Iowa
    MS-Off Ver
    MS 365 subscription V.2401
    Posts
    6

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    Thank you very much for the help! I updated my forum profile so it reads the correct version.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    Attach the workbook to the email. Do not attach the PDF to the email.

    How will the current supervisor email his completed workbook copy to the next supervisor ?

  5. #5
    Registered User
    Join Date
    04-16-2024
    Location
    Muscatine, Iowa
    MS-Off Ver
    MS 365 subscription V.2401
    Posts
    6

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    The one control button copies the filled out end of shift and attaches it to an email as a pdf. I attached the workbook. Thank you very much. I didn't know to do that.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    You are welcome

  7. #7
    Registered User
    Join Date
    04-16-2024
    Location
    Muscatine, Iowa
    MS-Off Ver
    MS 365 subscription V.2401
    Posts
    6

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    Okay, after some consideration I don't just want to attach the active workbook

  8. #8
    Registered User
    Join Date
    04-16-2024
    Location
    Muscatine, Iowa
    MS-Off Ver
    MS 365 subscription V.2401
    Posts
    6

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    I made the button that "submits" the workbook as a "saved as" copy because they can click it and the copy they filled out is saved to our shared drive and they can safely close the EOS template I made without accidentally saving the one they filled out and now the template for everyone else is a filled out version of the template.

  9. #9
    Registered User
    Join Date
    04-16-2024
    Location
    Muscatine, Iowa
    MS-Off Ver
    MS 365 subscription V.2401
    Posts
    6

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    So, I want I think for the one button to do the same thing it does "create a copy, save it as the name specified by the date and shift put on the EOS, and save it to the shared drive. Then I think it needs to somehow attach it to an email. currently the button I have creates a PDF copy of the EOS and attached it to an email that pops up and you just add who to send it to and hit send. I would like the copy of the EOS they saved to the shared drive to do the same thing. They hit submit. It saves it, and an email pops up with it attached.

  10. #10
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    Post your workbook with the updated macro code you are using to save the PDF file. Let me look at it.

  11. #11
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,987

    Re: I'm having trouble with some macros and I don't know if I need to combine them or edit

    Does this work for you?

    Please Login or Register  to view this content.

+ 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] Trouble combining two different macros
    By glide2131 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2021, 04:07 PM
  2. Replies: 4
    Last Post: 06-24-2012, 04:58 AM
  3. Excel 2007 : Can you edit Macros?
    By Ghost123 in forum Excel General
    Replies: 1
    Last Post: 11-25-2011, 02:56 PM
  4. How do you edit macros?
    By jgomez in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2011, 10:31 AM
  5. Trouble disabling macros
    By HelenStrand in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-21-2009, 11:35 AM
  6. Edit Links Trouble
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-09-2006, 10:55 PM
  7. [SOLVED] Trouble calling Add-In Macros
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2005, 07:05 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