Posts by nthuyil

    Hi everyone,


    I developed the content of the file but the someone else did the coding part and now he left.


    Could anyone help me with the code below:



    Sub Security_Check()


    Dim objLogin



    On Error GoTo 1


    Set objLogin = CreateObject("GCWebClient.UserInfo")
    If objLogin.getLoginMode() = 1 Then


    Else
    1: MsgBox "You need to be connected to a xxx network to run this workbook", , "Error"


    End
    End If


    'Workbooks.Open Filename:="L:\Client U to Z\X\Security\Security (Module X).xls"
    'Workbooks("Security (Module X).xls").Close


    'Workbooks.Open Filename:="L:\Client U to Z\X\Security\Security (Module X).xls"
    'Workbooks("Security (Module X).xls").Close


    End Sub



    -----------------


    I understand every time I open this worksheet, the security_check macro will run. This is to ensure no-one else from outside network can access the file. I can not trace back "Security (Module X).xls" file and do not understand "objLogin "GCWebClient.UserInfo")


    I want this worksheet can only be opened in a specific network (e.g, network name) - I move to a new company. Or in the worst case, for the same purpose, can I have a simpler code for the same purpose?


    Your help will be appreciated. You can reply here or contact me @ "[email protected]"[/email]