PC Review


Reply
Thread Tools Rate Thread

Automatically open different workbooks depending on user account used.

 
 
Excel@shoenfeltconsulting.com
Guest
Posts: n/a
 
      22nd Aug 2007
There are two userrs on the same computer. When user 1 opens Excel,
I'd like oen workbook to automatically open. When user2 opens Excel,
I'd like a diffferent workbook to automatically open. Is this
possible? (Each user logs into Windows usning their uuser account.)

The computer is running windows XP pro and Excel 2007.

Thanks,

 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      23rd Aug 2007
Something like this might work for you. This is untested. Post back if
this doesn't work for you. Place the following macro in the ThisWorkbook
module. You would need to change ThePath to your real path, the user
account names for Joe and Bill, and the names of the files you want opened.
HTH Otto
Private Sub Workbook_Open()
Dim ThePath As String
Dim FileName As String
ThePath = "C:\TheFolder\TheSubFolder"
If Environ("username") = "Joe" Then _
FileName = "FileForJoe.xls"
If Environ("username") = "Bill" Then _
FileName = "FileForBill.xls"
Workbooks.Open FileName:=ThePath & "\" & FileName
End Sub

"(E-Mail Removed)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> There are two userrs on the same computer. When user 1 opens Excel,
> I'd like oen workbook to automatically open. When user2 opens Excel,
> I'd like a diffferent workbook to automatically open. Is this
> possible? (Each user logs into Windows usning their uuser account.)
>
> The computer is running windows XP pro and Excel 2007.
>
> Thanks,
>



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      23rd Aug 2007
Looking again at the original post, wouldn't it be just as easy for each user to
have a desktop shortcut to Excel with the workbook name in the command line?

"C:\Program Files\Microsoft Office\Exceldata\Joebook.xls"

Or you could place the shortcut in the user's Startup folder if you want Excel
to open with that workbook when user log in.


Gord Dibben MS Excel MVP

On Wed, 22 Aug 2007 19:09:47 -0400, "Otto Moehrbach" <(E-Mail Removed)>
wrote:

>Something like this might work for you. This is untested. Post back if
>this doesn't work for you. Place the following macro in the ThisWorkbook
>module. You would need to change ThePath to your real path, the user
>account names for Joe and Bill, and the names of the files you want opened.
>HTH Otto
>Private Sub Workbook_Open()
> Dim ThePath As String
> Dim FileName As String
> ThePath = "C:\TheFolder\TheSubFolder"
> If Environ("username") = "Joe" Then _
> FileName = "FileForJoe.xls"
> If Environ("username") = "Bill" Then _
> FileName = "FileForBill.xls"
> Workbooks.Open FileName:=ThePath & "\" & FileName
>End Sub
>
>"(E-Mail Removed)" <(E-Mail Removed)> wrote in
>message news:(E-Mail Removed)...
>> There are two userrs on the same computer. When user 1 opens Excel,
>> I'd like oen workbook to automatically open. When user2 opens Excel,
>> I'd like a diffferent workbook to automatically open. Is this
>> possible? (Each user logs into Windows usning their uuser account.)
>>
>> The computer is running windows XP pro and Excel 2007.
>>
>> Thanks,
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
log on my user account automatically instead of Admin account, how? JoeDontKnow Windows XP Basics 5 16th Nov 2008 08:11 PM
log on my user account automatically instead of Admin account, how? JoeDontKnow Windows XP General 5 16th Nov 2008 08:11 PM
pc ignores account user log in password and open automatically =?Utf-8?B?VGVs?= Windows XP Security 1 2nd Oct 2007 10:30 PM
How to automatically open a set of workbooks on startup =?Utf-8?B?QUNhZDJLTWFu?= Microsoft Excel Setup 2 28th Mar 2007 01:54 PM
When I open Excel, workbooks open automatically. How can I stop t =?Utf-8?B?UmhlYWxiaXJk?= Microsoft Excel Misc 2 23rd Feb 2006 10:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:20 PM.