How to retrieve data from share folder using vba?

  • Thread starter Thread starter geniusideas
  • Start date Start date
G

geniusideas

Hi,
I wanted to create macro that able to retrieve data from share folder
through path \43.74.94.102\folder name\filename.xls (Example) then
copy to my current workbook. Pls help..

Thanks
 
dim wb as excel.workbook

set wb=workbooks.open("\\43.74.94.102\folder name\filename.xls")

with wb.sheets("sheettocopyfrom")
.range("A1:G500").copy thisworkbook.sheets("tohere").range("A1")
end with

wb.close false

Totally untested, but you get the idea.

Tim
 
dim wb as excel.workbook

set wb=workbooks.open("\\43.74.94.102\folder name\filename.xls")

with wb.sheets("sheettocopyfrom")
     .range("A1:G500").copy thisworkbook.sheets("tohere").range("A1")
end with

wb.close false

Totally untested, but you get the idea.

Tim

TQ..
Got the idea and will test asap..
 
Back
Top