vbnewline

  1. D

    Generating email using VBA

    Hi all it's me again, I'm using some code from Ron De Bruin's site to generate an email using the following code Sub Mail_small_Text_Outlook()'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm 'Working in Office 2000-2016 Dim OutApp As Object Dim OutMail As Object...
  2. S

    Name a worksheet after cell contents

    Hi I have a bit of coding that copies an existing worksheet (called "SCHEMES") and puts it before another worksheet ("AUDIT") but I'd like to add in some code that will automatically take the content of cell A1 of the sheet that's copied across and automatically uses that as the worksheet name...
  3. C

    Count down the loops by a number entered on a UserForm until "0"

    Good afternoon Mr. Excel, I have a workbook that runs through code using a UserForm with several TextBoxes and a couple of ComboBoxes. The below code shows what I have so far but I am trying to figure out how to Loop through the code a specific number of times based on a value the user will...
  4. I

    Specific cell must be Ucase advice

    Hi, I have the code shown below. My intention is that cell Z21 must be UPPERCASE So typing tom jones in cell Z21 then when i leave that cell it changes to TOM JONES Private Sub Worksheet_Change(ByVal Target As Range) With ThisWorkbook.Sheets("HONDA SHEET") If Not Intersect(Target...
  5. M

    VBA Outlook and Word Library - Late Binding help

    Hi Team, Please assist in converting below outlooks and word library code to late binding. Below is attempted Code. Sub Outlook_Late_Binding() Dim OutApp As Object Dim OutMail As Object Dim ProcurementStatusSh As Worksheet Dim WorkStatusSh As Worksheet Dim...
  6. A

    VBA code to add company logo at the end of the email with attachements

    Hi I have a macro which I wrote from watching a couple of YouTube videos, it works however, I would like to add the company logo at the bottom of the email, the image is saved in W:\company\logo.jpg. My codes are as follows: Sub send_email_with_attachments() On Error Resume Next Dim o As...
  7. K

    VBA - Excel to Outlook - But a loop based on date!!! HELP!!!

    :) Im so close! well kind of. Im a beginner and im trying to figure out how to Loop through ranges. So, i have an excel sheet and i want to send a series of emails once a week. So i currently figured out how to send an email based off of 1 chosen row (below), it takes the email address, it...
  8. S

    [VBA] Unable to sort tabs of selected sheets

    Sub SortSelectedWorksheets() '--------------------- MTxt = MsgBox("- Sort Selected Worksheet(s) -" & vbNewLine & "---------------------" & vbNewLine & _ "Yes : Ascendingly" & vbNewLine & _ "No : Descendingly", vbYesNoCancel) '--------------------- SheetCount =...
  9. S

    email help with adding content

    Hi All So trying to create an email, see code below, in particular the red text. I have data in columns N,O,P. but this can vary each time from 1 row to 30 rows. My example below showing 5 rows. What im wondering is if somehow i can loop, however many rows there happen to be per macro run...
  10. I

    Clear cell contents THEN close userform

    Afternoon. I have a worksheet called HONDA SHEET which has a drop down list in cell A2 When i make a selection from the list my userform called HondaSoldItems is shown & values etc shown. Now what i would like to happen is when i press my close button on the form "NOT the red cross" cell A2...
  11. J

    Adjust text in shapes

    Hi I have a small code that makes a shape with text. Are there anyone who can help change the code so that the three lines are centered horizontal in the shape? Best regards Jorgen Sub Shapes() Sheet1.Shapes.SelectAll Selection.Delete Set sh =...
  12. S

    Converting single row in excel to XML document using VBA

    Hi All I am after some help I have been asked if I can convert a spreadsheet that will have a variable number of rows into single XML files for ordering here is a basic example of my data <tbody> Name Brand Quantity Unique Code Mr Why Generic Ale 2 XML00001 Mr Who Generic Lager 4...
  13. H

    MsgBox vbYesNo

    Hi, I am trying to write some vba code which will allow me to look to see the value of a cell, if that cell = X then display a msgbox "cell = X, are you Sure?" with options yes or no. If they click no then it exits the sub routine. If they click yes then the code continues onto the next line...
  14. L

    VBA to use activesheet selection in Transpose

    Hi I am using the built-in function Transpose to convert an array to a string and would like to use the current selection ie change this Comments = Join(Evaluate("TRANSPOSE('Base'!A1:A10 )"), vbNewLine) to Comments = Join(Evaluate("TRANSPOSE(Selection )"), vbNewLine) The latter gives a...
  15. M

    user form Check box, recheck with code

    Can someone show me what code I would need to add to my current code. I want the "checkbox1" To look at the line that am on at on Column 'I" or "9" however that works and if the value is greater than "0" t recheck the box when the user form is opened. I am pretty new at this and have tried...
  16. G

    VBA to create new worksheet and using values from original workbook for SaveCopyAs name and path

    I have the following VBA which works to take data from the Workbook, create a new workbook and paste that data. Now I want code to utilize the SaveCopyAs to automatically save the file with name (fname) and path (fpath) taken from the original Workbook. I just don't know how to do this. The...
  17. H

    Macro to show sheet name attached

    I have macro to email sheet3 the macro works perfectly except it shows the name of the workbook followed by today date of the attached workbook I need this amended so that only sheet3followed by todays date is shown in the attached workbook Kindly amend this section of my code...
  18. V

    VBA: Remove special indentation (hanging indent)

    I have a slide in a PowerPoint presentation ("myPresentation") with some text in a shape. I want to add more text to this. In order to do this, I have stored the old text in a variable, wrote my new text and concatenated it with the variable (see below). myPresentation.Slides.InsertFromFile...
  19. S

    VBA code to add URL from excel cell into Outlook email line.

    Hi Experts, I need help on modified a VBA code below Sub Mail_small_Text_Outlook() Dim xOutApp As Object Dim xOutMail As Object Dim xMailBody As String Set xOutApp = CreateObject("Outlook.Application") Set xOutMail = xOutApp.CreateItem(0) xMailBody = "Dear All" &...
  20. N

    VBA Help - Email using different email address

    Hi All. I am currently trying to use a macro to pdf each individual sheet to email addresses in B2 of each sheet. This works perfectly. However I want to email using a different email account to my default one. This doesn't work perfectly! I have two seperate VBA scripts, one for PDF and...

Some videos you may like

This Week's Hot Topics

Top