LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default help needed offsetting until text

Hi guys!,

Im trying to get a macro to select a cell containing the text "shift
in cells to the right on the same row when a maro is run and not foun
a match in a list i have created, i can get it to work to a fashion bu
it throws up a "define" error...can anyone help?....i can send you th
test book that im working on, the code is in "this workbook" module o
worksheets...i also want to select all sheets in the work book whe
this macro is run.

I might be being a little sketchy on what i want, so if u need mor
info drop me a line, and i will try to explain or send u the testbook.

Cheers!
Simon

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
Dim t1 As String
Dim I1 As Integer
Dim res As Variant
Dim txt As Variant

t1 = InputBox("name", "input", "")
With Worksheets("Hidden")
res = Application.Match(t1, .Range(.Range("A2"), _
.Range("A2").End(xlDown)), 0)
End With
If Not IsError(res) Then
ActiveCell = t1
ActiveCell.Offset(1, 0).Activate
Exit Sub



'Worksheets("hidden").Visible = False
End If
'Next I2
I1 = MsgBox("Please try again " & Chr(13) & "Skill " & " Entry no
recognised " & "Please Contact Training Dept to Add Skill Title!!")
'If I1 = 1 Then
'Do Until ActiveCell = "shift " '& txt
'ActiveCell.Offset(0, -1).Select
If ActiveCell = (0) Then
'Do
'ActiveCell.Offset(0, -1).Select
'ActiveCell = xlToLeft
Range(ActiveCell, ActiveCell.End(xlToLeft).
'Loop Until ActiveCell = "shift " & txt

I have tried some other scenarios as you can see but i have commente
them out!


--
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
Offsetting Dan Wood Excel Discussion (Misc queries) 3 March 3rd 10 03:23 PM
Offsetting a formulas result. Patrick C. Simonds Excel Worksheet Functions 3 September 8th 09 07:58 PM
Offsetting the vlookup function clubin Excel Discussion (Misc queries) 4 November 13th 08 08:24 PM
Offsetting and HLOOKUP KellyB Excel Worksheet Functions 5 January 29th 08 07:09 PM
offsetting periods in chart saturnin02 Excel Discussion (Misc queries) 2 January 26th 05 07:53 PM


All times are GMT +1. The time now is 01:55 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"