davidmcnab
New Member
- Joined
- Sep 25, 2005
- Messages
- 38
Hi all...I need some help...I have a workbook that has 2 pages....on the "Schedules" page, you dble-click a cell in the columns shown and it will jump to the Data Sheet...you then select a data item and it will copy into the cell on Schedules....everything seems to work fine, unless you scroll to part of the Data Sheet that isn't shown on your screen (eg: cell AY282)....if you scroll and then select an item, it throws an error ('424').....any ideas about why this is happening? I am using Excel 2003.
There are 3 pieces of code (Private subs ?) on the "Schedules" sheet; Private Sub #3 is the code that I am concerned with, altho perhaps the problem is caused by a conflict b/w PS #1 or #2 and PS #3 (??)....all the code is shown below...
:
Dim EntryVal As Variant
'Dim EntryVal2 As Variant'
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
EntryVal = ActiveCell
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = EntryVal Or Target.Row < 12 Then Exit Sub
EntryVal = Target
If Not Intersect(Target, Range("x:x")) Is Nothing Then
Call Postpone(Target, 21)
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim rTime As Range
Dim rDate As Range
Dim wMtgSheet As Worksheet
Set wMtgSheet = Worksheets("Data Sheet")
If Not Intersect(Union(Range("g13:g14333"), Range("h13:h14333"), Range("m13:m14333"), Range("n13:n14333"), Range("o1314333"), Range("p1314333"), Range("t13:t14333"), Range("u13:u14333"), Range("v13:v14333"), Range("w13:w14333")), _
Target) Is Nothing Then
wMtgSheet.Activate
Set rTime = Application.InputBox( _
Prompt:="Select data from lists shown", _
Title:="SUPER SELECTOR", _
Type:=8)
Set rDate = Cells(rTime.Row, 3)
Me.Activate
Target.Offset(0, 0).Value = rTime.Value
Cancel = True
End If
End Sub
There are 3 pieces of code (Private subs ?) on the "Schedules" sheet; Private Sub #3 is the code that I am concerned with, altho perhaps the problem is caused by a conflict b/w PS #1 or #2 and PS #3 (??)....all the code is shown below...
:
Dim EntryVal As Variant
'Dim EntryVal2 As Variant'
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
EntryVal = ActiveCell
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target = EntryVal Or Target.Row < 12 Then Exit Sub
EntryVal = Target
If Not Intersect(Target, Range("x:x")) Is Nothing Then
Call Postpone(Target, 21)
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim rTime As Range
Dim rDate As Range
Dim wMtgSheet As Worksheet
Set wMtgSheet = Worksheets("Data Sheet")
If Not Intersect(Union(Range("g13:g14333"), Range("h13:h14333"), Range("m13:m14333"), Range("n13:n14333"), Range("o1314333"), Range("p1314333"), Range("t13:t14333"), Range("u13:u14333"), Range("v13:v14333"), Range("w13:w14333")), _
Target) Is Nothing Then
wMtgSheet.Activate
Set rTime = Application.InputBox( _
Prompt:="Select data from lists shown", _
Title:="SUPER SELECTOR", _
Type:=8)
Set rDate = Cells(rTime.Row, 3)
Me.Activate
Target.Offset(0, 0).Value = rTime.Value
Cancel = True
End If
End Sub