Login to Shared Folder Via IP Address

sg2209

Board Regular
Joined
Oct 27, 2017
Messages
117
Office Version
  1. 2016
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
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,214,400
Messages
6,119,292
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top