LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help needed, Input box doing 2 tasks?

Bob,

I dont think i can merge the code as 1 is a workbook event and works o
the same range on each sheet but the worksheet event works on differen
ranges on each sheet, here is the work book code it's out of the tes
book and not the working program but you will get the gist!

Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVa
Target As Range)
Dim myrange As Range
Dim isect As Range
If Sh.Name = "Hidden" Then Exit Sub
Set myrange = Sh.Range("E1:G20")


Set isect = Application.Intersect(myrange, Target)
If isect Is Nothing Then

Exit Sub
End If
Sheets("Sheet1").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array("Sheet1", "Sheet2", "Sheet4", "Sheet3")).Select
Sheets("Sheet1").Activate
Dim t1 As String
Dim I1 As Integer
Dim res As Variant

t1 = InputBox("Only Valid Skill Titles Will Be Allowed!", "Skil
Addition Box", "")
With Worksheets("Hidden")
res = Application.Match(t1, .Range(.Range("A2"), _
.Range("A2").End(xlDown)), 0)
End With
If Not IsError(res) Then
ActiveCell = t1
Range("A" & ActiveCell.Row).Select
Sheets(Array("Sheet1", "Sheet2", "Sheet4", "Sheet3")).Select
Sheets("Sheet1").Activate
Sheets("Sheet1").Name = "Sheet1"
Sheets("Sheet1").Select

Exit Sub



Worksheets("hidden").Visible = False
End If

I1 = MsgBox("Please try again " & Chr(13) & "Skill " & " Entry no
recognised " & "Please Contact Training Dept to Add Skill Title!!")
If ActiveCell = "shift " Then
Exit Sub
Else
Range("A" & ActiveCell.Row).Select
Sheets(Array("Sheet1", "Sheet2", "Sheet4", "Sheet3")).Select
Sheets("Sheet1").Activate
Sheets("Sheet1").Name = "Sheet1"
Sheets("Sheet1").Select

End If
End Sub

if you would like to have all the code i have for all macro's in th
working program i can either paste them into an e-mail or if you want
can attatch the whole program its 5.5 meg and when it updates o
shutdown (thats the way i have designed it)it takes about 5 mins to d
20 sheets!

E-mail me and let me know.

p.s are you a professional programmer or just have a great intrest i
VB?

Simon

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting tasks slavenp Excel Discussion (Misc queries) 0 July 29th 09 04:48 PM
Exporting tasks se7098 Excel Worksheet Functions 2 January 21st 09 03:37 PM
Too many client tasks? rml Excel Discussion (Misc queries) 0 July 19th 06 05:41 PM
Automating some tasks Justin C Excel Discussion (Misc queries) 0 April 27th 05 12:45 PM
What Tasks Can Be Automated? John Gregory[_2_] Excel Programming 5 February 2nd 04 06:49 AM


All times are GMT +1. The time now is 09:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"