ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Afternoon.
In a workbook i have 12 worksheets.
This code is in each worksheet "right click view code/paste"
This code is in ThisWorkbook
I have copied this workbook & kept it as a template etc.
Looking through each page the code does what iyt should do all apart from my MILEAGE sheet.
I can select any cell,leave the page,come back to this page & the same cell is selected and not the cell that should be selected.
Going back to the sheet it was copied from it works fine.
Ive copied the code for that sheet from original to template but still wont work.
I even just copied the original & deleted all the values in each cell on each page,remember this was working,i then go to the MILEAGE page and not it will not work
In a workbook i have 12 worksheets.
This code is in each worksheet "right click view code/paste"
Code:
Private Sub Worksheet_Activate() For i = 28 To 4 Step -1
If Cells(i - 1, "A") <> "" Then
Cells(i, "A").Select
Exit For
End If
Next
End Sub
This code is in ThisWorkbook
Code:
Private Sub Workbook_Open() Dim ws As Worksheet
Set ws = ActiveSheet
Application.ScreenUpdating = False
Sheets("LIST").Activate
ws.Activate
Application.ScreenUpdating = True
End Sub
I have copied this workbook & kept it as a template etc.
Looking through each page the code does what iyt should do all apart from my MILEAGE sheet.
I can select any cell,leave the page,come back to this page & the same cell is selected and not the cell that should be selected.
Going back to the sheet it was copied from it works fine.
Ive copied the code for that sheet from original to template but still wont work.
I even just copied the original & deleted all the values in each cell on each page,remember this was working,i then go to the MILEAGE page and not it will not work