Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2015, 02:28 PM
charlesdh charlesdh is offline Create macro program to automatically email outlook with a visible cell range Windows 7 32bit Create macro program to automatically email outlook with a visible cell range Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

H,
Heres the corrected code original did not show correctly.



Sub Filter_NonBank()
Application.ScreenUpdating = False
Dim Myval As Integer
Dim lrow As Long
lrow = Sheets("Bin inventory").Range("g65536").End(xlUp).Row
Selection.AutoFilter
Sheets("Bin inventory").Range("A1:h1").Select
Selection.AutoFilter
With Selection
.AutoFilter Field:=7, Criteria1:="<>" '' this set the filtered data for the value
End With
With Worksheets("Bin inventory").AutoFilter.Range
Set VisRng = .Resize(.Rows.Count - 1, 1).Offset(1, 0) _
.Cells.SpecialCells(xlCellTypeVisible)
'' make sure you have more than 1 row ''
Myval = .Range("c2:c" & lrow).SpecialCells(xlCellTypeVisible).Count
If Myval >= "2" Then
Worksheets("Bin inventory").Range(Cells(VisRng.Offset(, 0).Row, 7), Cells(Range("g65536").End(xlUp).Row, 7)).Select
End If
End With


End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically add firm name to visible contactname spqr² Outlook 0 12-29-2014 03:24 PM
Change formula cell range based on cell value Scoth Excel 4 10-25-2012 07:51 AM
Email macro to read range for .To field MattMurdock Excel Programming 2 08-07-2012 06:46 AM
Can't create new email or access email acounts Outlook 2003 onthebeaches Outlook 1 02-20-2012 10:21 PM
Outlook Not Sending Automated Email Unless Visible RMittelman Outlook 0 12-10-2010 11:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft