Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub ContactInfo()
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- Dim ArrayRange As Variant
- Dim ActCell As Variant
- Set ActCell = ActiveCell
- OwnerName = ActiveCell.Value
- If IsEmpty(ActiveCell) = True Or IsNumeric(ActiveCell) = True Then
- MsgBox "Please select Owner Name"
- Else
- Sheets("Combined").Select
- ArrayRange = Sheets("Combined").Range(Range("R1"), Range("R1").SpecialCells(xlLastCell))
- Sheets("Pivot").Select
- Lastname = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 3, False)
- Firstname = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 2, False)
- Phone = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 9, False)
- Address = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 4, False)
- MsgBox "Owner: " & OwnerName & vbCrLf & vbCrLf & "Contact: " & Lastname & ", " & Firstname & vbCrLf & vbCrLf & "Phone: " & Phone & vbCrLf & vbCrLf & "Address: " & Address
- Application.ScreenUpdating = True
- End If
- End Sub
- Sub PropertyInfo()
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- Dim ArrayRange As Variant
- Dim ActCell As Variant
- Set ActCell = ActiveCell
- PropertyName = ActiveCell.Value
- If IsEmpty(ActiveCell) = True Or IsNumeric(ActiveCell) = True Then
- MsgBox "Please select Property Name"
- Else
- Sheets("Combined").Select
- ArrayRange = Sheets("Combined").Range(Range("F1"), Range("F1").SpecialCells(xlLastCell))
- Sheets("Pivot").Select
- Maturity = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 38, False)
- Lender = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 43, False)
- Originator = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 44, False)
- Address = Application.WorksheetFunction.VLookup(ActCell, ArrayRange, 2, False)
- MsgBox "Property Name: " & PropertyName & vbCrLf & vbCrLf & "Loan Maturity: " & Maturity & vbCrLf & vbCrLf & "Lender: " & Lender & vbCrLf & vbCrLf & "Originator: " & Originator & vbCrLf & vbCrLf & "Property Address: " & Address & vbCrLf & vbCrLf & "Note: If dates are blank, the database doesnt have the info."
- Application.ScreenUpdating = True
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement