Results 1 to 2 of 2

Thread: Login to Shared Folder Via IP Address
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Oct 2017
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Login to Shared Folder Via IP Address

    Dear Friends,

    i am learning VBA and went to several websites and forums and with the help of those i have created a small tool in excel.
    where it gets collated multiple sheets into one, as of i have mapped the drive and its working file however now i want any one can do this exercise and its not possible for me to map the drive for everyone so we have shared folder which can be accessible though IP Address now got stuck how do i amend my code so it can work there.

    IP Address : // 50.24.2.41
    Shared Folder Name // Team_TT_Collections
    Sub Folder Name //Sachin

    i want my tool to be placed in the subfolder Sachin

    there are 2 codes in Vlook Up everything is good too go

    Sub LoopThroughDirectory()
    Dim MyFile As String
    Dim MyPath As String
    Dim Wbk As Workbook
    Dim DestSht As Worksheet

    Set DestSht = ThisWorkbook.Sheets("Raw")
    MyPath = "C:\Users\HP\Desktop\UPD"
    MyFile = Dir(MyPath)

    Do While Len(MyFile) > 0
    If MyFile <> "Collated.xlsm" Then

    Set Wbk = Workbooks.Open(MyPath & MyFile)
    Wbk.Sheets("Sheet1").Range("A2:S5000").Copy DestSht.Range("A" & Rows.Count).End(xlUp).Offset(1)

    Wbk.Close False
    End If

    MyFile = Dir
    Loop
    'Freezing the Top Row
    Rows("2:2").Select
    ActiveWindow.FreezePanes = True


    End Sub




    Sub VlookupVBA()


    'Vlook up from Team Name to Raw
    Dim lLastRow As Long

    With Sheets("Raw")
    lLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
    With .Range("U2:U" & lLastRow)
    .FormulaR1C1 = "=VLOOKUP(RC3,'Team Name'!C2:C3,2,FALSE)"
    .Value = .Value
    End With
    End With


    End Sub

    Could you guys please review and help me

  2. #2
    Board Regular
    Join Date
    Oct 2017
    Posts
    61
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Login to Shared Folder Via IP Address

    Any suggestions please ?

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
  •