Barryj
07-19-2011, 10:42 AM
I have the following code that allows a user to use a program on only one specific machine, it picks up the name of the machine.
I want to allow users to use another machine, I have tried putting in the other machines name but this does not work.
Can anyone offer a suggestion how to overcome this?
Private Sub Workbook_Open()
If Environ("ComputerName") <> UCase("Bal36840") Then
MsgBox "This Is Not An Authorised Computer, Contact The Administrator!" & vbCrLf & "(C)Barry 2011"
Me.Close SaveChanges:=False
Else
'** Do your thing here
MsgBox "You Have Authorisation To Use This Program On This Computer", , Format(Now, " dd mmm yyyy ") & ("ABC")
MsgBox "Please Ensure You Check The Fortnight Ending Date Before Printing TimeSheets", , Format(Now, " dd mmm yyyy ") & ("ABC")
End If
End Sub
I have tried changing this line:
If Environ("ComputerName") <> UCase("fuj36840", "fuj18369") Then
To
If Environ("ComputerName") <> UCase("Bal36840", "Bal18369") Then
Thanks for any ideas.
I want to allow users to use another machine, I have tried putting in the other machines name but this does not work.
Can anyone offer a suggestion how to overcome this?
Private Sub Workbook_Open()
If Environ("ComputerName") <> UCase("Bal36840") Then
MsgBox "This Is Not An Authorised Computer, Contact The Administrator!" & vbCrLf & "(C)Barry 2011"
Me.Close SaveChanges:=False
Else
'** Do your thing here
MsgBox "You Have Authorisation To Use This Program On This Computer", , Format(Now, " dd mmm yyyy ") & ("ABC")
MsgBox "Please Ensure You Check The Fortnight Ending Date Before Printing TimeSheets", , Format(Now, " dd mmm yyyy ") & ("ABC")
End If
End Sub
I have tried changing this line:
If Environ("ComputerName") <> UCase("fuj36840", "fuj18369") Then
To
If Environ("ComputerName") <> UCase("Bal36840", "Bal18369") Then
Thanks for any ideas.