View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Code for positioning cursor in many sheets


Right click on the excel icon to the left of FILEview codeinsert thissave
workbook.
I tested with a worksheet tab where 8 was the name

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If IsNumeric(ActiveSheet.Name) Then [e4].Activate
End Sub

"Sandy" wrote in message
...
Hello!

I have a few workbooks that contain tab names that are
alphabetic (for five of the sheets) and the rest, which
can be x amount of sheets, are all numeric.

I want the ones with the numeric tabs to each have the
cursor position at E4 when the workbook is opened.

Is there a way to do this with code? I know I can specify
each sheet individually, but I need code that uses a
variable, like: If the tab is numeric, position the
cursor at E4.

Any help will be greatly appreciated!

Sandy