+ Reply to Thread
Results 1 to 18 of 18

Command button to transfer multiple data to other sheets, saving in PDF, send email

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Unhappy Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi all,
    I have attached the dummy sheet.
    It is a bit complex ( for me) to achieve certain functions.
    All is explained in the attached file.
    Since I am learning, all seems too challenging for me or i am expecting too much. I dont know.
    i have been on it for some time and can not find a solution.
    I am very fortunate that so far I have been helped by many members and my words will fall short to thank them.
    It may be bit similar to what I have been trying to achieve, however this is a different approach to it, hence a new thread now.
    I am sure that there must be simple way of doing it.
    ( I can not figure out on how to attach tags.... basic though, but I will hopefully figure out in my next thread)

    Please help me.

    kind regards
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    1) How to save a range as a PDF

    The fNAME string is created from the Location plus the Area plus the date. The file is saved in a known folder location fPATH.

    Please Login or Register  to view this content.

    2) Attach that file to an email
    Please Login or Register  to view this content.
    3) Rotate sheet2 values to "Cumulative" section
    Put this code in your command button
    Please Login or Register  to view this content.
    4) Totals on Sheet9:

    D71: =COUNT(Sheet2!K:K)
    E71: =AVERAGE(Sheet2!K:K)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi JB Sir,

    Fantastic help from you. There is too much to learn for me. It is progressing fine. I will let you know the outcome in a week.
    Hopefully I am able to make use of this information to achieve my goal of learning and progressing.
    Thanks again Sir
    Kind regards

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    If that takes care of your original query, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi JB sir,

    I am still having issue with the PDF and saving file. Actually I am making errors in getting the things right.
    The entire issue is with my understanding and that will be resolved by more learning & practice.
    Your solutions are absolutely perfect.
    Since the original query has been resolved I am closing this thread.
    Once again my words will ever fall short to thank you.
    I have really liked your way of explaining, as it is easy to understand and implement.
    Many thanks again
    Kind regards

  6. #6
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi JB Sir,
    I was unwell for some time, and could not continue with my work. I did started from scratch and have almost got back on track with all the great help that I got from you.
    Now however I am getting a error message 400 for both the PDF and email issue.
    Apology for reopening this thread, with hope that I will again get your help.
    Many thanks
    Kind regards

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Sure, what's your question? My previous answers that you used to formulate a working solution can still be found above.

  8. #8
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi JB Sir,
    I constantly get ERROR400 when use the code .
    Possible explanation can be.....
    Form already displayed; can't show modally (Error 400)
    You can't use the Show method to display a visible form as modal. This error has the following cause and solution:
    You tried to use Show, with the style argument set to 1 – vbModal, on an already visible form.
    Use either the Unload statement or the Hide method on the form before trying to show it as a modal form.
    Cant understand this.....
    Can you help please
    Thanks

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Have you tried the suggestions in that error message?

  10. #10
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    There is no suggestion given... That is the issue.

  11. #11
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    To be honest I dont know how to deal with this

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    It's telling you that somewhere in your code you have a .Show command trying to execute on a Form that is already showing. You'll need to use a .Hide command prior to that or unload the form.

  13. #13
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi JB Sir,
    I am getting there. I have amended the code. Please see if this is what you are suggesting. I have not tried the amended code unless I cross check with you.
    Please Login or Register  to view this content.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Be sure to use the original posts in this thread as a source for your research. If you notice in post #2 where this code was originally considered, .Show was not in that code, it was .Display. See it?

  15. #15
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Dear JB Sir,
    I have given up now. I use outlook for emails. Earlier everything was fine, however it does not work now.
    In a way it does save file in the folder, however does not attach it to email ( generally it used to open the email outlook with this file attached).
    Now it shows error400.
    Just cant understand. I have given up. Please help.
    Regards

  16. #16
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    Hi JB Sir,
    Thanks for leading me to the answer .... and not give me the answer.
    This has helped me a lot to learn.
    For me you are like my Guru... a tough one though.... But it should be that way so that we all can learn rather depend upon a ready made answer.
    Thanks again for your help.
    Kind regards

  17. #17
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    THis is one of the scenarios where I feel bad. The answers given to your original questions should, of course, work for you a second time. I do not see the cause of the problems from what you've posted other than the .Display correction.

  18. #18
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Command button to transfer multiple data to other sheets, saving in PDF, send email

    You are right.
    I am a slow learner and more so a small set back due to sickness.
    Well , never say never.
    My learning continues.
    Thanks JB Sir again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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