locate active cell in range (1 Viewer)

sunshine076

Registered User.
Local time
Today, 09:08
Joined
Apr 6, 2009
Messages
160
I believe that I am on the right track with my thinking in regards to active cells in a range. what I am wanting to do is as an individual enters a value in a range of (F14:F1000) and is greater than .001 it will send an email to appropriate person.
Code:
Sub Mylarchk()
Dim val as Integer
Dim rg as Range
rg("F14:F1000")
  If activecell. range >.001 then
blat
End Sub
Private Sub Blat() 'Optional ByRef OV As Integer, Optional OV As Integer, Optional PL As Integer, Optional ID As String)
Dim ID As String
Dim OV As Integer
Dim TV As Integer
Dim PL As Integer
Dim MatchUp As Boolean
ID = CloseOutOVL.ID: OV = CloseOutOVL.OV: TV = CloseOutOVL.TV: PL = CloseOutOVL.PL: MatchUp = CloseOutOVL.MatchUp
'If SO = "Test" Then Exit Sub
On Error Resume Next
Dim strMail(15) As Variant
Dim str1 As String
Dim x As Integer
Dim CName As String
CName = fOSMachineName
If MatchUp Then
    strMail(1) = "<html><body>"
    strMail(2) = "The following value val & " from machine: " & CName
    strMail(3) = "SO: " & so
    strMail(4) = "Part: " & PN
    strMail(5) = "Op: " & op
    strMail(6) = "</body></html>"
    Workbooks.Add
    For x = 1 To 6
    Cells(x, 1).Value = strMail(x) & "<br>"
    Next x
End If
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:="c:\blat\ovlout.txt", FileFormat:=xlTextMSDOS
ActiveWorkbook.Close
'MsgBox "Blat file ready for review"
Application.DisplayAlerts = True
Select Case UCase(Plant)
    Case "MFG"
        Select Case UCase(de)
            Case "MILL":      Shell ("""C:\Blat\Blat.exe"" -server 92.92.92.12 -tf ""Y:\Quality\EmailLists\mylarerror.txt"" -subject ""Mill Mylar Tip Error"" -f [EMAIL="aircraft@moeller.com"]aircraft@moeller.com[/EMAIL] -html")
            Case "CGR":    Shell ("""C:\Blat\Blat.exe"" -server 92.92.92.12 -tf ""Y:\Quality\EmailLists\mylarerror.txt"" -subject ""CFG Mylar Tip Error"" -f [EMAIL="aircraft@moeller.com"]aircraft@moeller.com[/EMAIL] -html")
        End Select
End Select
End Sub
 

Users who are viewing this thread

Top Bottom