vbnewline

  1. H

    Macro to email and attach sheet

    I have a macro to copy a sheet and attach the same format including all the comments as the sheets The macro work to a point, except that the format for the percentages is pasted as text It is the code below that I need amended to paste the data in exactly the same format including comments...
  2. B

    Click a SUBMIT button to activate the coding

    Hi, I am looking for some help in regards to using a "SUBMIT" button to activate the coding this is the coding I presently have done: Dim xRg As Range Sub Worksheet_Change(ByVal Target As Range) Set xRg = Intersect(Range("F12"), Target) If Not (xRg Is Nothing) Then If...
  3. A

    email vba to grab info from cell to put on subject

    Hello, I need help! I am trying to get the subject from a cell for example: ("B5") = Daniel ("B6") = Mark Email Subject: "Can " Mark " Please be advised that appointment is due" Depending on expiring date to grab the correct cell and put on subject This is the code I have so far...
  4. C

    Sending an email in excel

    Overview of what i am trying to achieve - I have a list of data that could be 1000 rows long and i want to send an email to everyone manager on the list as a reminder to do something but if a manager appears on the list more than once this means they have multiple employees with the same issue...
  5. G

    command button code changing sheet name

    Hello, i have the following code for a command button, however currently whenever i select a name via the message box the sheet name changes to that name I cannot see anything in my code to do this... Can only think i have pressed or selected something in error. just cant find it. Any ideas...
  6. O

    VBA to unzip files and overwrite existing files

    Hello Guys, I have a VBA code that unzips the files in a folder. I wish to modify the code so that existing files will automatically be overwritten (without the prompt to confirm). Any help will be greatly appreciated. Below is the existing code: Sub UnzipFiles Dim ShellApp As Object Dim...
  7. R

    Excel VBA Loop Routine Outlook email not printing first message

    Hi I have a problem with a routine that:- 1) loops through a customer table (CustCode(col1),FirstName(col3),EMail(col5) 2) make a copy (based on CustCode) of a master workbook and sends it to a designated directory 3) uses outlook to send the new workbook to the sender (using firstName, Emial)...
  8. C

    Pulling Information From Spreadsheet to VBA

    Good Afternoon, i am currently running this code Sub Macro1() Dim xOutApp As Object Dim xOutMail As Object Dim xMailBody As String Set xOutApp = CreateObject("Outlook.Application") Set xOutMail = xOutApp.CreateItem(0) xMailBody = "Hi there" & vbNewLine & vbNewLine & _...
  9. A

    Write the ranges in the desired position from MS-Access to MS-Word

    Hello Everybody, I want to write a string in Microsoft Word always in the same position but unfortunately i am not able to do it. I tried first something like Dim PatName As String *70 but for the first loop works but in the second loop the position changes. Dim PatName...
  10. V

    Having multiple colors in a textbox

    I am trying to use VBA to insert a yellow textbox that has Procedures, Tickmarks, and Conclusion on separate lines. I have been able to do so. Now I am trying get font to change after the headings. Below is the an example and code for trying to get the font unbolded and black after...
  11. S

    Email from VBA with some words in bold

    Hello everyone. I've wrote the following VBA code that captures a range of cells from an excel file and send it via email adding a brief description as introduction. I'd like the uppercase AAA, BBB and CCC to be in bold. How can I do that? Sub Send_Range() ' Select the range of cells on...
  12. Jaafar Tribak

    Adding commandbar controls to the Ribbon QAT via VBA ?

    I am experimenting with programming the ribbon and I want to add at runtime two new commandbar controls to the QAT namely the FileNewDefault and the Spelling controls. The code below generates the xml string and writes the xml string to the Excel.OfficeUI file. However the controls do not load...
  13. G

    Sending a csv file to a ftp site.

    I have written a macro that sends a sheet as a csv file to an email address. What if I want to send it to an FTP site instead? Not sure how I would change my code. Any advice would be appreciated. Sub Mail_small_Text_Outlook2() If Range("c157").Value = "" Or Range("c159").Value = "" Then...
  14. O

    VBA - Split String closest to 300 char with the delimiter fullstop

    Hi I need to split a string closest to 300 characters where the last character is a full stop...woah hope that makes sense :). The text keeps concatenating depending on the values in other cells for example: If Sheets("control").Range("B15").Value = "AS2124" Then letterString = letterString...
  15. Mahantesh_Torgal

    Need Help - VBA SMTP Mailing - Send all Listbox items

    Hi Excel Teachers, Can you please please help me with this? I have VBA listbox which populates data for a given specific date range. But i want to send as an email this Listbox items in table format using SMTP technique. I tried but not getting the exact way. Could you please help...
  16. I

    Do-While Loop Error w/ Condition Declaration @ End of Loop

    Hi everyone, most likely a simple explanation here but I'm not seeing it... I get a "Compile Error - Loop without Do" message on the first line of the code below. I've got a do in there... obviously it's placed in such a way that it doesn't recognize it, but I'm not comfortable with what needs...
  17. M

    Excel Macro Print to PDF

    Hi ALL, I am using this macro to print the invoices in the separate PDF file. Please can someone modify to code to print the all invoices in one PDF file. Sub PrinttoPdf1() Dim i As Integer Dim Startrange As Integer Dim Endrange As Integer Dim PSh As Worksheet Dim PPath As String On Error...
  18. G

    Send a sheet from a workbook as a CSV file as an email attachment

    Hi, I have a workbook containing multiple sheets. I have figured out a way to send the entire workbook as an email attachment in Outlook. it works great. What I need to do now is send just one sheet named ICIMS from the workbook as a CSV file attachment. Any ideas? Here's what I have so far...
  19. P

    Inserting Hyperlink into body of email sent from excel

    Hi all, I have tried searching threads and I am still struggling to find an answer that works for me, so I am hoping that you can help. I have a complicated workbook that is used for event planning purposes. The template is saved to various project folders before use- the project folders are...
  20. N

    Unsuccessful Worksheet.Change with Target Range

    Hello and thank you for any attention my post may receive. I have a worksheet that has one target range (P3:P500) containing formulas where if the cell in this column on the active row calculates to 3 then a message box will appear so that the user can decide to either cancel, or OK to execute...

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