strpath

  1. D

    Adding a range to body of email

    Hi, I have this VBA that works great. It convert a specific range in active worksheet and attaches as PDF to email. Now I'm trying to also add the same range to the body of the email. Any advise? Sub SendPDF() ' Create PDF and send as attachment. Dim strPath As String, strFName As...
  2. S

    VBA Code - Save as PDF - Windows & Mac - Adjustment to code needed please

    Hi there, I have created several templates in excel ( latest version ) and have added a command button which saves the template as PDF, the code below works perfect for me on windows but some of the users have MACs and they get the following error when pressing the button...
  3. A

    Repeated saving to a workbook

    Hi everyone I have the following code, however I noticed a message keep prompting that a workbook has been saved twice and asked whether the old workbook should be replaced. I noticed there are duplicate code in my macro (the red and blue bits), however, if I deactivate the red bit, it stopped...
  4. J

    SaveCopyAs error 1004

    Hi all I am struggling with a runtime 1004 error with the routine below. I want to save a copy of the current workbook into a sub folder. The code checks the sub directory exists and if not creates it. This works OK, Its the last line of the script that fails. Any advice please. Private Sub...
  5. S

    Set PageBreak and PrintArea

    Hello, I wrote a code to set dynamically Print Area, based on a cell value. After that I want to set Page Brake. In the and, I want to export the sheet in PDF. In this code, PageBreake is not working. This excel file will be used by many people, on many computers. I am trying to find a way to...
  6. countryfan_nt

    Combine all sheets from different workbooks in 1 Summary Sheet.

    Hello friends! Hope all is well, I have the 2 codes below, that work smoothly, and must be applied in order. The codes in short combine the sheets’ contents of different workbooks into 1 sheet. The codes may need some adjustment to avoid the below challenges: The problem are: 1. The sheets...
  7. M

    Query SharePoint based Db

    I have a Db located in a sharepoint folder and I am struggling getting a connection to open. I have an Excel front end file which needs to query and write to this database. When building in test mode on my desktop, the following in the Excel front end file worked perfectly well and the...
  8. P

    Excel VBA for PDF Creater - 2 pages per sheet

    Hi all , I'm good in Excel with Formulas and Pivot Tables but have like 0.5/10 understanding of VBA. I have studied some programming before so have a slight idea on syntax , operators etc. 99% of my job I don't need to use VBA but I'm working on something and need to in this case. In Excel...
  9. B

    Close Workbook VBA

    Hi, I have a workbook that stores a Macro that saves the current worksheet in another workbook as a PDF. The Macro is activated using button in the quick access toolbar. I cant get the workbook that holds the macro to close after the PDF has been created. The workbook that holds the macro...
  10. C

    Old Code needs updating - Password Protection

    Hi All, We have some old code that we use to basically create a mail merge from a data set as individual letters. I didn't write the code but i need to find away to password protect the each file with a specific password for example say Field1&Field2. Could anyone help with this? Sub...
  11. H

    Modifying CVS File

    I have the following code to open up a csv file I am trying to autofit all the columns and then save and close the file However when opening up the file, the columns are not autofitted to the length of the largest item in each column Kindly amend my code below so that the columns autofit...
  12. D

    Really annoying...

    So I have this... Sub SaveMyWorkbook() Dim strPath As String Dim strFolderPath As String strFolderPath = "S:\Quality Control\Reports\Defects\2017\" strPath = strFolderPath & _ Sheet2.Range("A1").Value & _ Sheet2.Range("A2").Value & _...
  13. D

    How to maintain a distributed VBA Macro with multiple users

    <tbody> I have built an extensive program for my organization which periodically needs to be updated. I have tried having a macro that deletes all the old macros except itself and then reimports from a central repository but I run into a naming problem. Source code below. I have reference...
  14. Z

    Testing if various folders are empty

    Hi, I have around 60 folders on a shared network that various people are going to save files into. I need a way to check if they have saved the files in their folder. So I tried the below code and it worked: Strpath = "P:\SARS\2017 Financial year\1. July\Botswana\" If Right(Strpath, 1) <> "\"...
  15. P

    VBA - Saving tabs as multiple PDF files

    Hey guys I have this VBA code which saves specific excel tab to PDF. However, I have many tabs in the excel file to be saved. How do I change the code so it saves all excel tabs in the worksheet with defined name (cell B4) as a specific file name? I am not familiar with VBA coding at all and...
  16. L

    Save file to a specific folder location

    Hello, I have this code that I would like to modify to have the pdf output saved in a specific folder location but I'm not sure which area of this code to modify and insert this specific location. Any help would be appreciated The location is G:\Finance\Corporate Accounting\SHIRLEY\A...
  17. R

    Adding Signature to new email macro - Used to work

    Hi team, Previously I used Dim signature As String / ObjMail.HTMLBody = strHTMLBody & ObjMail.Body which used to get the default signature when the macro was executed, however since implementing a PDF attachment, it no longer works. I also tried to create a path to the signature folders but...
  18. R

    Rename PDF filename in attachment to new email

    Hi all, I have a macro that generates a PDF of the active worksheet and attaches it to a new email however it currently displays as the workbook name as per the code but I get an error if I try to change it to a range. Could someone kindly assist? Sub Adcorp_PDF() ' ' Adcorp_PDF Macro ' '...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top