Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, i am using Ron de Bruyns e-mail code and it works 100% but i would
like to set the Importance to high with code before it gets sent. With OutMail .To = EmailAddr .CC = ccAdd .BCC = "" .Subject = Subj .Body = BodyText .ImportanceHigh = True **** Does not work ?? .ReadReceiptRequested = True .Attachments.Add ActiveWorkbook.FullName .Display 'send End With Any help would be appreciated. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use
.Importance = 2 I will add a few things to my tips page soon -- Regards Ron de Bruin http://www.rondebruin.nl "Les Stout" wrote in message ... Hi, i am using Ron de Bruyns e-mail code and it works 100% but i would like to set the Importance to high with code before it gets sent. With OutMail .To = EmailAddr .CC = ccAdd .BCC = "" .Subject = Subj .Body = BodyText .ImportanceHigh = True **** Does not work ?? .ReadReceiptRequested = True .Attachments.Add ActiveWorkbook.FullName .Display 'send End With Any help would be appreciated. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dankie Ron. Ron can you help out with some code to create an Autofilter
on a spreadsheet. I was using the code below but now it gives me an error !! Rows("1:1").Select ' Selection.AutoFilter Selection.AutoFilter Field:=10, Criteria1:="=*ZA-T-M-*", Operator:=xlAnd Selection.AutoFilter Field:=10, Criteria1:="=*za-t-m-**", Operator:=xlAnd With Worksheets("Tabelle1") If ..AutoFilter.Range.Columns(1).Cells.SpecialCells(x lCellTypeVisible) _ .Count = 1 Then Else With .AutoFilter.Range .Resize(.Rows.Count - 1).Offset(1, 0).EntireRow.Delete End With End If End With Selection.AutoFilter Field:=10 Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Less
If you use And then use it like this Example from my site : Replace ron and dave to your criteria Sub Delete_with_Autofilter_Array() Dim Rng As Range Dim I As Long Dim myArr As Variant myArr = Array("ron", "Dave") For I = LBound(myArr) To UBound(myArr) ActiveSheet.Range("A1:A100").AutoFilter Field:=1, Criteria1:=myArr(I) With ActiveSheet.AutoFilter.Range Set rng = Nothing On Error Resume Next Set Rng = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _ .SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not Rng Is Nothing Then Rng.EntireRow.Delete End With Next I ActiveSheet.AutoFilterMode = False End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Les Stout" wrote in message ... Dankie Ron. Ron can you help out with some code to create an Autofilter on a spreadsheet. I was using the code below but now it gives me an error !! Rows("1:1").Select ' Selection.AutoFilter Selection.AutoFilter Field:=10, Criteria1:="=*ZA-T-M-*", Operator:=xlAnd Selection.AutoFilter Field:=10, Criteria1:="=*za-t-m-**", Operator:=xlAnd With Worksheets("Tabelle1") If AutoFilter.Range.Columns(1).Cells.SpecialCells(xlC ellTypeVisible) _ .Count = 1 Then Else With .AutoFilter.Range .Resize(.Rows.Count - 1).Offset(1, 0).EntireRow.Delete End With End If End With Selection.AutoFilter Field:=10 Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is better
Sub Delete_with_Autofilter_Array() Dim Rng As Range Dim I As Long Dim myArr As Variant myArr = Array("ron", "Dave") For I = LBound(myArr) To UBound(myArr) ActiveSheet.Range("A1:A100").AutoFilter Field:=1, Criteria1:=myArr(I) With ActiveSheet.AutoFilter.Range Set rng = Nothing On Error Resume Next Set Rng = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _ .SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not Rng Is Nothing Then Rng.EntireRow.Delete End With Next I ActiveSheet.AutoFilterMode = False End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Hi Less If you use And then use it like this Example from my site : Replace ron and dave to your criteria Sub Delete_with_Autofilter_Array() Dim Rng As Range Dim I As Long Dim myArr As Variant myArr = Array("ron", "Dave") For I = LBound(myArr) To UBound(myArr) ActiveSheet.Range("A1:A100").AutoFilter Field:=1, Criteria1:=myArr(I) With ActiveSheet.AutoFilter.Range Set rng = Nothing On Error Resume Next Set Rng = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _ .SpecialCells(xlCellTypeVisible) On Error GoTo 0 If Not Rng Is Nothing Then Rng.EntireRow.Delete End With Next I ActiveSheet.AutoFilterMode = False End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Les Stout" wrote in message ... Dankie Ron. Ron can you help out with some code to create an Autofilter on a spreadsheet. I was using the code below but now it gives me an error !! Rows("1:1").Select ' Selection.AutoFilter Selection.AutoFilter Field:=10, Criteria1:="=*ZA-T-M-*", Operator:=xlAnd Selection.AutoFilter Field:=10, Criteria1:="=*za-t-m-**", Operator:=xlAnd With Worksheets("Tabelle1") If AutoFilter.Range.Columns(1).Cells.SpecialCells(xlC ellTypeVisible) _ .Count = 1 Then Else With .AutoFilter.Range .Resize(.Rows.Count - 1).Offset(1, 0).EntireRow.Delete End With End If End With Selection.AutoFilter Field:=10 Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dankie Ron, jammer vir die laat antwort. Ek het dit probeer en dit het
gut gewerk. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Weight the coulum totals by level of importance? | Excel Discussion (Misc queries) | |||
Find range a value fits to, assign new value based on importance | Excel Worksheet Functions | |||
Code launches Mail Merge but disables the Mail Merge | Excel Discussion (Misc queries) | |||
Values and Formulas - Problem - High Importance | Excel Programming | |||
Creating TWO-WAY E-Mail Attachments with 'BeforeSave Events' in Code for 2nd E-Mail | Excel Programming |