Results 1 to 2 of 2

Thread: How to link a value in excel workbook cell which is on Google Drive to Another workbook in google drive
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    May 2018
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation How to link a value in excel workbook cell which is on Google Drive to Another workbook in google drive

    Hello there,
    Hopefully everybody is fine,


    I have planned a lot and structured the data for many hours and days,
    now I would like to know how I can link excel cell value of workbook1 to workbook2 in the case that they are in google drive because when I opened the other workbook is shows a message which contain "update", "not update", "Help" when I click update it gets the local link while I am working with another people for example me for sales and other for purchase and so on so how I can unify the link to be 1 or what is the possible idea to avoid changing the normal cell link to local path.

    Another thing can I encrypt the sheet with password if I can all of my problem is solved without any extra step so I can put all of the tables in different sheets and lock each of them with password because I don't want user1 to see user2 data and so on... so I have permissions also I just want user1 to see what I just get from user2 table and the opposite is true.

    Actually I have an idea but I didn't test it out yet...
    the idea is: to let 2 laptops or devices carry on the same Username and to let google drive to be installed in the same path so even if the link converted to local link, it still can get the values without any problem I don't know if this idea is correct or not but this is what I am thinking about currently.

    Thank you so much,
    hopefully my question is clear if there's not clear please tell me about it.
    Last edited by AlaaEddin; May 11th, 2019 at 03:48 AM.

  2. #2
    New Member
    Join Date
    May 2018
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to link a value in excel workbook cell which is on Google Drive to Another workbook in google drive

    Actually I have found this code and it does what I need but there's 1 problem that if you use a tool like kutools and click the option of unhide all sheets then all sheets will be hidden so what I need to add to the following code is when the username and password are correct in addition of visible the sheet which required the sheet to be unprotected so after visible the sheet I need to protect workbook structure again... so how I can perform that in the following code:

    Private Sub Workbook_Open()
    Dim Sh As Worksheet
    Dim UserName As String
    Dim Password As String
    Dim ThisCell As Range
    Dim c As Long
    For Each Sh In ThisWorkbook.Worksheets
    If ThisWorkbook.ProtectStructure = True Or ThisWorkbook.ProtectWindows = True Then ThisWorkbook.Unprotect WPwd
    Sh.Activate
    If Sh.Name <> "WELCOME SCREEN" Then
    Sh.Visible = xlSheetVeryHidden
    End If
    Next Sh
    UserName = InputBox("Please enter your user name.")
    Password = InputBox("Please enter password.")
    For Each ThisCell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
    If UCase(ThisCell.Value) = UCase(UserName) And UCase(ThisCell.Offset(, 1).Value) = UCase(Password) Then
    MsgBox "Access Granted"
    For c = 2 To 4
    'This is the number of sheets from C1 to E1
    If ThisCell.Offset(, c).Value <> "" Then
    Sheets(Sheets("User List").Cells(1, c + 1).Value).Visible = xlSheetVisible
    End If
    Next c
    Exit Sub
    End If
    Next ThisCell
    MsgBox "Access Denied"
    ThisWorkbook.Close
    End Sub

    this code placed in THISWORKBOOK

    the idea of the code is to create WELCOME SCREEN sheet and User List sheet which contain a table with username + password + sheet1 + sheet2 + .... as columns
    under the sheet1, sheet2 I just insert "x" to let the sheet visible for the user or "" empty if I want the sheet to not be visible for the user, the only problem that the hidden sheet can be visible by kutools or maybe another tools when you click hide/unhide all sheets which make everything useless and weak.

    Thanks in Advanced

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •