View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Simon Lloyd[_402_] Simon Lloyd[_402_] is offline
external usenet poster
 
Posts: 1
Default Help! need some adjustments!

You have all been helpful in the past...but i need a little more!. Her
is some code i have sorted out, how do i get it to run on which eve
sheet i switch to and only the one i switch to and if you read what
have so far you will see a comment half way down advice on this as wel
please!

thanks, Simon.

Option Explicit
Dim myrange As Range
Dim isect As Variant
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set myrange = Range("A1:D20")
Set isect = Application.Intersect(myrange, Target)
If isect Is Nothing Then
MsgBox "Select Core, 1st, 2nd, 3rd or 4th Skill" & " or Enter
Skill Competency Spot!"
Exit Sub
End If
Dim t1 As String
Dim I1 As Integer
Dim I2 As Integer
I1 = MsgBox("This Will Allow You To Enter a Skill, Continue?"
292, "Skills input")
If I1 = 6 Then
For I2 = 1 To 3
t1 = InputBox("name", "input", "")
'this next line i would like to get it to look up a range o
another sheet and check for 1
'of the values entered in t1
If t1 = "mark" Or t1 = "paul" Or t1 = "eric" Or t1 = "john
Then
ActiveCell = t1
Exit Sub
Else
Worksheets("hidden").Visible = True
Worksheets("hidden").Select
ActiveSheet.Range("a2").Select
Selection.Insert Shift:=xlDown
Selection = t1
Worksheets("hidden").Visible = False
End If
Next 'I2
MsgBox "Please try again " & Chr(13) & "Skill " & t1 & " Entry no
recognised "
MsgBox "Please Contact Training Dept to Add Skill Title!!"

End If


End Sub

p.s your quite welcome to have the test workbook e-mailed to u if yo
want to play around with it just give me your addres

--
Message posted from http://www.ExcelForum.com