View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 109
Default Opening an Excel Pivot table sheet with right information

Something like this (you will need co-operation from your users to set
up their name under Tools/Options). Copy/paste into the ThisWorkbook
module :

'--------------------------------------
Sub Private Sub Workbook_Open()
nm = Application.UserName
'(as set under Tools/Options)
Select Case nm
Case "F Smith"
ActiveSheet.PivotTables("PivotTable1"). _
PivotFields("Project").CurrentPage = "Project 1"
Case "J Brown"
ActiveSheet.PivotTables("PivotTable1"). _
PivotFields("Project").CurrentPage = "Project 2
End Select
End Sub
'--------------------------------------

Regards
BrianB
'========================



"Tom Walker" wrote in message ...
Hi all,

I use EXCEL XP to view my Cube which shows project
information like this.

Project A $100
Project B $200
Project C $300

Now I have a requirement that when the user opens up the
excel sheet it should open his/her project by default. So
if Project B is managed by that user the list should
suppress all other projects (the user can do this, but I
want this to be done by Excel)

The list should only show
Project B $200

I think I will have to do some kind of macro programming
to accomplish this. Is that the right way to do this ?

Thanks,
Tom