Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to retrieve data from share folder using vba?

0 views
Skip to first unread message

geniusideas

unread,
Nov 20, 2009, 5:51:42 AM11/20/09
to
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

Tim Williams

unread,
Nov 20, 2009, 12:29:16 PM11/20/09
to
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


"geniusideas" <geniu...@gmail.com> wrote in message
news:25642fa2-aa65-4733...@t11g2000prh.googlegroups.com...

geniusideas

unread,
Nov 21, 2009, 8:46:42 AM11/21/09
to
On Nov 21, 1:29 am, "Tim Williams" <timjwilli...@comcast.net> wrote:
> 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
>
> "geniusideas" <geniusid...@gmail.com> wrote in message

>
> news:25642fa2-aa65-4733...@t11g2000prh.googlegroups.com...
>
> > 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

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

0 new messages