schang_825
Board Regular
- Joined
- Feb 19, 2010
- Messages
- 66
Hi all,
I have created a schedule for the tenants of a new condo to move in. They are assigned a date, time and elevator. One tab has the schedule in a calendar format with the unit numbers entered into the desired date/time/ elevator slot.
In another tab, I have the tenant's contact information and Moving Company info. When the tenant calls to schedule their move in time, I would like to enter their unit number on the calendar, then have the "Contact Info" tab open and display only that unit number and select the Moving Company cell.
I tried to use the "Worksheet_Change" event, but it doesn't seem to be working. This is what I have:
Private Sub Worksheet_Change(ByVal Sh As Object, ByVal Target As Range)
Dim rcell As Range
Application.ScreenUpdating = False
Application.EnableEvents = False
On Error GoTo ErrHnd
If Not Application.Intersect(Range("D10:GC30"), Target) Is Nothing And Target.Text <> "" Then
Sheets("Contact Info").Select
Sheets("Contact Info").Range("B2:B500").EntireRow.Hidden = True
For Each rcell In Sheets("Contact Info").Range("B2:B500")
If rcell.Value = Target.Text Then
rcell.EntireRow.Hidden = False
rcell.Offset(0, 4).Select
End If
Next rcell
End If
Application.ScreenUpdating = True
ErrHnd:
Err.Clear
Application.EnableEvents = True
End Sub
Any suggestions??
I have created a schedule for the tenants of a new condo to move in. They are assigned a date, time and elevator. One tab has the schedule in a calendar format with the unit numbers entered into the desired date/time/ elevator slot.
In another tab, I have the tenant's contact information and Moving Company info. When the tenant calls to schedule their move in time, I would like to enter their unit number on the calendar, then have the "Contact Info" tab open and display only that unit number and select the Moving Company cell.
I tried to use the "Worksheet_Change" event, but it doesn't seem to be working. This is what I have:
Private Sub Worksheet_Change(ByVal Sh As Object, ByVal Target As Range)
Dim rcell As Range
Application.ScreenUpdating = False
Application.EnableEvents = False
On Error GoTo ErrHnd
If Not Application.Intersect(Range("D10:GC30"), Target) Is Nothing And Target.Text <> "" Then
Sheets("Contact Info").Select
Sheets("Contact Info").Range("B2:B500").EntireRow.Hidden = True
For Each rcell In Sheets("Contact Info").Range("B2:B500")
If rcell.Value = Target.Text Then
rcell.EntireRow.Hidden = False
rcell.Offset(0, 4).Select
End If
Next rcell
End If
Application.ScreenUpdating = True
ErrHnd:
Err.Clear
Application.EnableEvents = True
End Sub
Any suggestions??