Help!

worksheet that will only work on one users pc

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  problem setting up Outlook 2007 on Windows Vista  
Author Message
Fan924
External


Since: Jun 04, 2009
Posts: 6



PostPosted: Thu Jun 04, 2009 9:34 pm    Post subject: worksheet that will only work on one users pc
Archived from groups: microsoft>public>excel (more info?)

I am trying to create a excel worksheet that will only work on one
users pc. Oh no, not that again! I have read much of the archives
here..

I am not looking for something bullet proof. I just want to make it
difficult for the average user to pass around worksheet copies. If I
can key a macro to detect something that is unique in every users pc.
Ideas?
Back to top
Per Jessen
External


Since: Jan 27, 2009
Posts: 32



PostPosted: Fri Jun 05, 2009 6:10 am    Post subject: Re: worksheet that will only work on one users pc [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi

You could use this:

Private Sub Workbook_Open()
' use ?Environ("Computername") in Immediate window to to get computer name
If Environ("Computername") <> "MyComputerName" Then ActiveWorkbook.Close
SaveChanges:=False
End Sub

Regards,
Per

"Fan924" <a924fan RemoveThis @yahoo.com> skrev i meddelelsen
news:0b8d6d02-a71a-4b8a-9dfc-4a561c672b22@k2g2000yql.googlegroups.com...
>I am trying to create a excel worksheet that will only work on one
> users pc. Oh no, not that again! I have read much of the archives
> here..
>
> I am not looking for something bullet proof. I just want to make it
> difficult for the average user to pass around worksheet copies. If I
> can key a macro to detect something that is unique in every users pc.
> Ideas?
Back to top
AltaEgo
External


Since: Feb 17, 2009
Posts: 16



PostPosted: Fri Jun 05, 2009 10:10 pm    Post subject: Re: worksheet that will only work on one users pc [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

1) This is very easily worked around by disabling macros when the WB is
opened. You could make it a little more robust by hiding sheets
(xlveryhidden) on exit and unhiding them when the WB is opened and macros
are enabled. You would just leave one sheet visible advising macros are
required and usage of the WB is restricted to particular user/s.

2) You could use Environ("USERNAME") in place of Environ("Computername") as
used by Per to limit it to a particular user rather than a particular PC.



--
Steve

"Per Jessen" <per.jessen RemoveThis @mail.dk> wrote in message
news:OeItbqb5JHA.4116@TK2MSFTNGP04.phx.gbl...
> Hi
>
> You could use this:
>
> Private Sub Workbook_Open()
> ' use ?Environ("Computername") in Immediate window to to get computer name
> If Environ("Computername") <> "MyComputerName" Then ActiveWorkbook.Close
> SaveChanges:=False
> End Sub
>
> Regards,
> Per
>
> "Fan924" <a924fan RemoveThis @yahoo.com> skrev i meddelelsen
> news:0b8d6d02-a71a-4b8a-9dfc-4a561c672b22@k2g2000yql.googlegroups.com...
>>I am trying to create a excel worksheet that will only work on one
>> users pc. Oh no, not that again! I have read much of the archives
>> here..
>>
>> I am not looking for something bullet proof. I just want to make it
>> difficult for the average user to pass around worksheet copies. If I
>> can key a macro to detect something that is unique in every users pc.
>> Ideas?
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum