Changing the ActiveSheet
Hi David -
Yes, worksheets have an Index property and they are numbered sequentially
from left to right, starting with 1. So, these statements may work for you:
'Check the value in cell A1 of the sheet before the activesheet
MsgBox Worksheets(ActiveSheet.Index - 1).Range("A1")
'Activate the sheet before the activesheet
Worksheets(ActiveSheet.Index - 1).Activate
---
Jay
"David" wrote:
Thanks for the help so far, it's working well!
Another query.
I have worksheets Apr, May, Jun etc.
Sometimes when I go into Jun worksheet for example, I might need to
also check what was in the previous month, is there an easy way of
doing this rather than saying if it's Jun then check May etc etc? Are
worksheets numbered even though they have names?
Thanks again!
|