Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with debug
Why is this not working?
Sub FindSheet() Dim Temp As String Dim i As Integer Temp = InputBox("Enter Sheet Name") For Each Sheet In ActiveWorkbook <<< Bombing here at this line !! If ActiveSheet.Name = Temp Then MsgBox "Found the sheet!", vbOKOnly End If Next End Sub Thanks in Advance, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with debug
Sub FindSheet()
Dim Temp As String Dim i As Integer Temp = InputBox("Enter Sheet Name") For Each Sht In ActiveWorkbook.Worksheets If lcase(Sht.Name) = lcase(Temp) Then MsgBox "Found the sheet!", vbOKOnly Exit For End If Next End Sub -- Regards, Tom Ogilvy "Jim May" wrote in message news:CI2Sc.17532$Bb.17221@lakeread08... Why is this not working? Sub FindSheet() Dim Temp As String Dim i As Integer Temp = InputBox("Enter Sheet Name") For Each Sheet In ActiveWorkbook <<< Bombing here at this line !! If ActiveSheet.Name = Temp Then MsgBox "Found the sheet!", vbOKOnly End If Next End Sub Thanks in Advance, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help with debug
Thanks Tom; have printed off for "in-depth" study.
It's depressing to have worked with this stuff as long as I have and to know as little as I do, we all appreciate your giving-attitude. Jim "Tom Ogilvy" wrote in message ... Sub FindSheet() Dim Temp As String Dim i As Integer Temp = InputBox("Enter Sheet Name") For Each Sht In ActiveWorkbook.Worksheets If lcase(Sht.Name) = lcase(Temp) Then MsgBox "Found the sheet!", vbOKOnly Exit For End If Next End Sub -- Regards, Tom Ogilvy "Jim May" wrote in message news:CI2Sc.17532$Bb.17221@lakeread08... Why is this not working? Sub FindSheet() Dim Temp As String Dim i As Integer Temp = InputBox("Enter Sheet Name") For Each Sheet In ActiveWorkbook <<< Bombing here at this line !! If ActiveSheet.Name = Temp Then MsgBox "Found the sheet!", vbOKOnly End If Next End Sub Thanks in Advance, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DeBug | Excel Discussion (Misc queries) | |||
help with debug | New Users to Excel | |||
No debug box | Excel Programming | |||
debug - | Excel Programming | |||
debug help | Excel Programming |