View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Alvin Hansen[_2_] Alvin Hansen[_2_] is offline
external usenet poster
 
Posts: 209
Default copy sheet again again

Hi Ron
Thank you I can see the light
I downloadet example And its working in the file
ADOTEST
but if i copy the module into another file to use it here
I get this error

Compile error
Userdefined Type
not Defined

It stop in the line: Dim rsdata as adodb.recordset

What do i do wrong -- its working in the ADOTEST file I don't uderstand this

Alvin



"Ron de Bruin" skrev:

Hi Alvin

Have you copy the functions also??

Download the example Zip file on that page to test it

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Alvin Hansen" wrote in message ...
I have read some off whar has been writing here in this forum
and find theis code from
http://www.rondebruin.nl/ado.htm

the code I use is
Sub GetData_Example1()
'This Copy the range to the ActiveCell
GetData ThisWorkbook.Path & "\test.xls", "Sheet1", "A1:C5", ActiveCell,
False

'This Copy the range to the Sheet/Range you want
'GetData ThisWorkbook.Path & "\test.xls", "Sheet1", "A1:C5",
Sheets("Sheet2").Range("A1"), False

End Sub

but get an error
its stop with Getdata and the error is:

compile error
Sub or function not defined.
Can some one help

Alvin