Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excell 2003 and trying to write a sub that does one thing if a cell
"g43" contains the words "2 stage" then go to cell "b635" and end the sub. If not, I want it to open another worksheet in the same workbook. Here is my code. No matter what is in g43, it goes to the new worksheet: If Range("g38") = "2 stage" Then GoTo line1 Else GoTo line2 line1: Range("b635").Select GoTo Lastline line2: Sheets("Encana Blend W WS").Visible = True ActiveWorkbook.Sheets("Encana Blend W WS").Unprotect Password:="b" Application.Goto ActiveWorkbook.Sheets("Encana Blend W WS").Cells(3) ActiveWorkbook.Sheets("Encana Blend W WS").Protect Password:="b" Sheets("Ticket Wizard").Visible = False Lastline: End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nested If's vs. GoTo statements | Excel Programming | |||
IF then GoTo | Excel Programming | |||
operator statements, shorting when reusing one of the statements? | Excel Programming | |||
On Error Goto doesn't goto | Excel Programming | |||
On Error Goto doesn't goto | Excel Programming |