• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Search results

  1. RDAngelo

    VBA Macro to find last col. and paste data

    Add the email addresses and attach the code snippets to the appropriate buttons... Sub Question() Dim lRow As Long lRow = ActiveSheet.UsedRange.Columns("C").Find("*", searchdirection:=xlPrevious).Row With CreateObject("Outlook.Application").CreateItem(0) .Display .To...
  2. RDAngelo

    VBA to send email having body message copied from excel

    From Microsoft "... Remarks If used, the Option Explicit statement must appear in a module before any procedures. When Option Explicit appears in a module, you must explicitly declare all variables by using the Dim, Private, Public, ReDim, or Static statements. If you attempt to use an...
  3. RDAngelo

    VBA to send email having body message copied from excel

    Glad I could be of some service.
  4. RDAngelo

    VBA to send email having body message copied from excel

    Try this version... Option Explicit Sub Filter_Data_and_Send_Email_v2() Dim rg As Range, i As Long Dim fltr As Range, oDoc As Object Dim sBody As String Set rg = Sheet1.Cells(1, 1).CurrentRegion Set fltr = Sheet2.Cells(1, 1).CurrentRegion sBody = "Hi There ," &...
  5. RDAngelo

    VBA to send email having body message copied from excel

    Assumes the following: Sheet1 contains email addresses Sheet2 contains reporting data Data on both worksheets begins at A1 Data on both worksheets have header rows MS Outlook is up and running Code copied into standard module Option Explicit Sub Filter_Data_and_Send_Email() Dim rg As...
  6. RDAngelo

    Replace file in same path and with same name

    Glad to help!
  7. RDAngelo

    Replace file in same path and with same name

    Possibly... Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim sh As Worksheet Dim fName As String Const a110w As String = "123" With Me fName = Left(.FullName, InStrRev(.FullName, ".") - 1) .Unprotect Password:=a110w For Each sh In .Sheets...
  8. RDAngelo

    Excel bulk emails thru VBA (same file and table)

    Glad I could help!
  9. RDAngelo

    Reading of incoming emails or saving of content and / or attachments with the CDO system

    Excuse my ignorance,.. What is a CDO system?
  10. RDAngelo

    Excel bulk emails thru VBA (same file and table)

    This works on your template Sub Test3() '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 Dim cell As Range Application.ScreenUpdating = False Set OutApp =...
  11. RDAngelo

    VBA(Mail a row or rows to each person in a range)

    Possibly... Sub test() Dim v As Variant, cc As Variant Dim i As Long, oMail As Object With Worksheets("Sheet1") v = .Cells(1, 1).CurrentRegion cc = Application.Transpose(.Range("I2:I" & .Cells(Rows.Count, 9).End(xlUp).Row)) End With With...
  12. RDAngelo

    Excel bulk emails thru VBA (same file and table)

    Try changing this line If cell.Value Like "?*@?*.?*" And _ LCase(Cells(cell.Row, "F").Value) = "Y" Then to this If cell.Value Like "?*@?*.?*" And _ UCase(Cells(cell.Row, "F").Value) = "Y" Then
  13. RDAngelo

    VBA to Save workbook in multiple sub folders

    Possibly... Option Explicit Sub Not_Tested() 'Assumes mulitple folders under sPath, 'a 2020help folder under each of those multiple folders, 'and the .xlsx file to copy in the sPath folder. Dim sPath As String Dim oFolders As Object Dim oFdr As Object sPath = "c:\temp\"...
  14. RDAngelo

    Auto Name and save with field input

    You're welcome!
  15. RDAngelo

    Auto Name and save with field input

    Drop this into the worksheet's code module... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$3" Then ThisWorkbook.SaveAs "C:\Desktop\Prospectives\" & Target.Value, 52 End If End Sub
  16. RDAngelo

    VBA - Search all workbooks in a folder for text criteria and copy row to new sheet

    Possibly... Dim strFirstAddress As String Dim strSearch As String Dim strExtension As String Dim wOut As Worksheet Dim wkbSource As Workbook Dim wks As Worksheet Dim rFound As Range Dim lRow As Long Const strPATH As String = "/Users/xxx/Desktop/combine/"...
  17. RDAngelo

    Copy Multiple Cells form one Sheet to Another

    Try assigning these to your buttons... Sub Button1() Dim c As Range With Worksheets("Cash Flow Balances") Set c = .UsedRange.Find(Worksheets("Account_Add").Cells(7, 6).Value, LookIn:=xlValues) If Not c Is Nothing Then c.Offset(, 1) =...
  18. RDAngelo

    Save files based on Cell value

    Option Explicit Sub Save_Files_Based_on_Cell_Value() '!!! Be aware the FileCopy method will overwrite an existing file with the same name !!! Dim sPath As String, s As String, ss As String Dim v As Variant, f As Variant Application.ScreenUpdating = False sPath =...
  19. RDAngelo

    Save files based on Cell value

    Try this, but remember that because some of your test files have the same value in A1, some file will be overwritten. Option Explicit Sub Save_Files_Based_on_Cell_Value() '!!! Be aware the FileCopy method will overwrite an existing file with the same name !!! Dim sPath As String...
  20. RDAngelo

    Save files based on Cell value

    Possibly... Sub Save_Files_Based_on_Cell_Value() '!!! Be aware the FileCopy method will overwrite an existing file with the same name !!! Dim sPath As String, s As String Dim v As Variant, f As Variant Application.ScreenUpdating = False sPath =...
  21. RDAngelo

    Excel crashing when using copy or cut in areas where conditional formatting with custom function is applied.

    365 Pro Plus. You might try running Inspect Workbook for compatibility problems.
  22. RDAngelo

    Excel crashing when using copy or cut in areas where conditional formatting with custom function is applied.

    This worked for me with no crashing... Function ColorTest(C As Range) As Boolean Application.Volatile ColorTest = C.Interior.ColorIndex = -4142 End Function and the conditional formula as =ColorTest(A5)
  23. RDAngelo

    Macro does not copy correctly

    Possibly this will work... Sub Not_Tested() '!!! Test on a copy of your data !!! Dim ws1 As Worksheet, ws2 As Worksheet Dim lRow As Long Application.ScreenUpdating = False Set ws1 = Worksheets("xxx") Set ws2 = Worksheets("zzz") With ws1.Cells(8...
  24. RDAngelo

    What is wrong with this VBA

    Try... Sub PostToOct_21() Dim WS1 As Worksheet, WS13 As Worksheet Dim lastRow As Long Dim rngCopy As Range, rngPaste As Range Set WS1 = Worksheets("Invoice") Set WS13 = Worksheets("Oct_21") With WS13 lastRow = .Cells(Rows.Count, 1).End(xlUp).Row...
Back
Top