Opening an Excel Pivot table sheet with right information

T

Tom Walker

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
 
D

Don Pistulka

Tom,

I would suggest the use of the UserName in a Workbook_Open event.
Something like this, placed in the ThisWorkbook module.


Private Sub Workbook_Open()
myuser = (Application.UserName)
Select Case myuser
Case "Don"
Call donsmacro 'run marco to change PT

Case "Bill"
Call billsmarco 'run marco to change PT

Case "Joe"
Call joesmarco 'run marco to change PT
End Select
End Sub

Don Pistulka
 
D

Don Pistulka

Tom,

I would suggest the use of UserName in a Workbook_Open event.
Something like this, placed in the ThisWorkbook module.


Private Sub Workbook_Open()
myuser = (Application.UserName)
Select Case myuser
Case "Don"
Call donsmacro 'run marco to change PT

Case "Bill"
Call billsmarco 'run marco to change PT

Case "Joe"
Call joesmarco 'run marco to change PT
End Select
End Sub

Don Pistulka
 
B

BrianB

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
'========================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top