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...
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...
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 ," &...
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...
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...
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 =...
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...
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
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\"...
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
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/"...
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) =...
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 =...
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...
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 =...
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)
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...
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...