S
STimber
I am working on an Excel VBA project and would like to only allow th
user to view the first worksheet of a workbook that contains a varyin
amount of sheets (up to 10).
Orginally I wanted to Hide all of the sheets so that only the firs
appeared, but some necessary finctions require these other sheets to b
programmatically set as Selected, which errors if they are hidden.
My next option was to leave the other sheets unhidden, but not allo
the user to change worksheets. The code that i have entered for thi
reads:
Private Sub oSheet_Deactivate()
oBook.Sheets(1).Activate
End Sub
The problem with this code is that when the user tries to select a ne
sheet, it briefly appears and then change back to the original sheet
ALso is the user were to hold his/her mouse click, the sheet is visibl
until they release it.
Im pretty new to Excel programming, so I'm hoping that there is
simpler way to accomplish this. Any ideas?
Scot
user to view the first worksheet of a workbook that contains a varyin
amount of sheets (up to 10).
Orginally I wanted to Hide all of the sheets so that only the firs
appeared, but some necessary finctions require these other sheets to b
programmatically set as Selected, which errors if they are hidden.
My next option was to leave the other sheets unhidden, but not allo
the user to change worksheets. The code that i have entered for thi
reads:
Private Sub oSheet_Deactivate()
oBook.Sheets(1).Activate
End Sub
The problem with this code is that when the user tries to select a ne
sheet, it briefly appears and then change back to the original sheet
ALso is the user were to hold his/her mouse click, the sheet is visibl
until they release it.
Im pretty new to Excel programming, so I'm hoping that there is
simpler way to accomplish this. Any ideas?
Scot