PC Review


Reply
Thread Tools Rate Thread

ADO versus VBA

 
 
ytayta555
Guest
Posts: n/a
 
      21st Mar 2008
HI ALL

Can somebody please to learn me if ADO
can do an autofill method in a closed workbook ? ...
.... to do in a closed workbook the same action
like in VBA :
Range("B91:B7000").Select
Selection.AutoFill Destination:=Range("B91:BB7000"),
Type:=xlFillDefault

???This is my first information that I need strongly !

2.The second thing is to know if ADO can do ClearContents in a closed
workbook like in VBA code :
Sheets("1").Range("C91:BB22005").ClearContents,
but with the workbook not open .

____________________________________
I'm beginner in ADO , I don't know to
write querry in ADO to corespund to this 2
actions in VBA : Range("B91:B65536").Select
Selection.AutoFill Destination:=Range("B91:BB65536"),
Type:=xlFillDefault , and Sheets("1").Range("C91:BB65536").
ClearContents ;
This are only 2 things I need (and I don't know if
ADO do this actions with workbook not open ). Can
somebody give me any sugestions and help ?


Thank you very much ,any sugestion is very
helpfull for me .



 
Reply With Quote
 
 
 
 
Mark Ivey
Guest
Posts: n/a
 
      21st Mar 2008
ADO is a method used to connect to a data source and retrieve information.
There are a variety of uses for ADO (even in VBA).

I would strongly recommend searching the net to see what ADO can do for you.

Here are few links to get you started:

http://support.microsoft.com/kb/257819

http://www.exceltip.com/st/Import_data_from_Access_to_Excel_(ADO)_using_VBA_in_Microsoft_Excel/427.html

http://www.microsoft.com/technet/scr.../tips0607.mspx

http://www.excelguru.ca/taxonomy/term/2



Mark Ivey


"ytayta555" <(E-Mail Removed)> wrote in message
news:cb927d2c-a352-48e8-97ea-(E-Mail Removed)...
> HI ALL
>
> Can somebody please to learn me if ADO
> can do an autofill method in a closed workbook ? ...
> ... to do in a closed workbook the same action
> like in VBA :
> Range("B91:B7000").Select
> Selection.AutoFill Destination:=Range("B91:BB7000"),
> Type:=xlFillDefault
>
> ???This is my first information that I need strongly !
>
> 2.The second thing is to know if ADO can do ClearContents in a closed
> workbook like in VBA code :
> Sheets("1").Range("C91:BB22005").ClearContents,
> but with the workbook not open .
>
> ____________________________________
> I'm beginner in ADO , I don't know to
> write querry in ADO to corespund to this 2
> actions in VBA : Range("B91:B65536").Select
> Selection.AutoFill Destination:=Range("B91:BB65536"),
> Type:=xlFillDefault , and Sheets("1").Range("C91:BB65536").
> ClearContents ;
> This are only 2 things I need (and I don't know if
> ADO do this actions with workbook not open ). Can
> somebody give me any sugestions and help ?
>
>
> Thank you very much ,any sugestion is very
> helpfull for me .
>
>
>

 
Reply With Quote
 
ytayta555
Guest
Posts: n/a
 
      21st Mar 2008
On 21 Mar, 14:23, "Mark Ivey" <wmivey6311NOS...@hotmail.com> wrote:
> ADO is a method used to connect to a data source and retrieve information.
> There are a variety of uses for ADO (even in VBA).


Thank very much for links , Mark ; I understand
that ADO can extract data from a few source of
database , I want to know if it (ADO) can do
and some actions in this database ;(and , I said,
I need autofill and delete a range )
 
Reply With Quote
 
Mark Ivey
Guest
Posts: n/a
 
      21st Mar 2008
I have not had much experience with ADO and Excel...

From my understanding, you can only retrieve information from a data source
with ADO using queries. I do not think it is possible to alter a data
source, but I could be mistaken.

If anyone else has better information for this topic, please post your
thoughts, ideas...

Mark

"ytayta555" <(E-Mail Removed)> wrote in message
news:138791e4-e59f-4cae-94a5-(E-Mail Removed)...
> On 21 Mar, 14:23, "Mark Ivey" <wmivey6311NOS...@hotmail.com> wrote:
>> ADO is a method used to connect to a data source and retrieve
>> information.
>> There are a variety of uses for ADO (even in VBA).

>
> Thank very much for links , Mark ; I understand
> that ADO can extract data from a few source of
> database , I want to know if it (ADO) can do
> and some actions in this database ;(and , I said,
> I need autofill and delete a range )


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      21st Mar 2008

Sounds like it might be easier to just open the workbook

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"ytayta555" <(E-Mail Removed)> wrote in message
news:138791e4-e59f-4cae-94a5-(E-Mail Removed)...
> On 21 Mar, 14:23, "Mark Ivey" <wmivey6311NOS...@hotmail.com> wrote:
>> ADO is a method used to connect to a data source and retrieve
>> information.
>> There are a variety of uses for ADO (even in VBA).

>
> Thank very much for links , Mark ; I understand
> that ADO can extract data from a few source of
> database , I want to know if it (ADO) can do
> and some actions in this database ;(and , I said,
> I need autofill and delete a range )


 
Reply With Quote
 
ytayta555
Guest
Posts: n/a
 
      21st Mar 2008
On 21 Mar, 15:25, "Don Guillett" <dguille...@austin.rr.com> wrote:
> Sounds like it might be easier to just open the workbook


Thanks again

I have now 231 workbooks and the number can became
bigger ; I find that in ADO you can work with SQL querrys;
maybe SQL can do this actions (autofill and delete) in my
database ;I am looking for (...normaly..) speed .I just read in
an Mark's link that ADO can to write data in a database , too ;
maybe I'll find how to do and this 2 actions (if it is posible ),
autofill and delete .
 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      21st Mar 2008
I don't see how ADO could do autofill; ADO is not a worksheet modification
tool. ADO can definitely extract data from a closed workbook, and though I
have little experience, it is my impression that it can also store data in a
closed workbook. You might be able to use VBA in conjunction with ADO to (a)
calculate the values that need to be filled in and modify the related
records, or (b) delete the appropriate records.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"ytayta555" <(E-Mail Removed)> wrote in message
news:1771d4b3-9144-4142-9b7b-(E-Mail Removed)...
> On 21 Mar, 15:25, "Don Guillett" <dguille...@austin.rr.com> wrote:
>> Sounds like it might be easier to just open the workbook

>
> Thanks again
>
> I have now 231 workbooks and the number can became
> bigger ; I find that in ADO you can work with SQL querrys;
> maybe SQL can do this actions (autofill and delete) in my
> database ;I am looking for (...normaly..) speed .I just read in
> an Mark's link that ADO can to write data in a database , too ;
> maybe I'll find how to do and this 2 actions (if it is posible ),
> autofill and delete .



 
Reply With Quote
 
ytayta555
Guest
Posts: n/a
 
      21st Mar 2008
On 21 Mar, 16:09, "Jon Peltier" <jonxlmv...@SPAMpeltiertech.com>
wrote:
> I don't see how ADO could do autofill; ADO is not a worksheet modification
> tool. ADO can definitely extract data from a closed workbook, and


Many thanks for informations , I'll work .
Or maybe SQL can do this , have anybody any ideea ?

Respectfully
 
Reply With Quote
 
Dick Kusleika
Guest
Posts: n/a
 
      21st Mar 2008
On Fri, 21 Mar 2008 04:27:20 -0700 (PDT), ytayta555
<(E-Mail Removed)> wrote:

>Can somebody please to learn me if ADO
>can do an autofill method in a closed workbook ? ...
>... to do in a closed workbook the same action
>like in VBA :
>Range("B91:B7000").Select
> Selection.AutoFill Destination:=Range("B91:BB7000"),
>Type:=xlFillDefault
>


What kind of data is in B91? Is it a number? A date? ADO can't do an
AutoFill, but you may be able to do something similar. Generally when you
use ADO to read or write to a closed workbook, the worksheet to which you
are writing is set up like a database table - that is, each row is like a
record and each column is a field.
>
>2.The second thing is to know if ADO can do ClearContents in a closed
>workbook like in VBA code :
>Sheets("1").Range("C91:BB22005").ClearContents,
>but with the workbook not open .


I think you can simply write a bunch of empty strings. It wouldn't be the
same as ClearContents, but it may suit your needs. The same concern about
setting up your worksheet as a table applies.

Having said all that, I agree with everyone else who said this sounds like a
bad idea.
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com
 
Reply With Quote
 
ytayta555
Guest
Posts: n/a
 
      21st Mar 2008
On 21 Mar, 17:41, Dick Kusleika <dkusle...@gmail.com> wrote:
> What kind of data is in B91? *Is it a number? *A date? *ADO can't doan
> AutoFill, but you may be able to do something similar. *Generally when you
> use ADO to read or write to a closed workbook, the worksheet to which you
> are writing is set up like a database table - that is, each row is like a
> record and each column is a field.


In Range (B91:B65536) are 65446 Count function !!
can ADO do something similar AutoFill
Destination:=Range("B91:BB65536")?


> Having said all that, I agree with everyone else who said this sounds likea
> bad idea.> Dick Kusleika
> Microsoft MVP-Excelhttp://www.dailydoseofexcel.com




I just try , and many thaks for help and sugestions

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vista versus other windows versus felmasba Microsoft Powerpoint 1 9th Mar 2008 08:32 AM
NativeMethods versus SafeNativeMethods versus UnsafeNativeMethods? (reflector) kilik3000@gmail.com Microsoft C# .NET 1 23rd May 2007 08:44 PM
Static versus Singleton versus seperate Instantiations... Dan Bass Microsoft C# .NET 3 21st Nov 2004 11:19 PM
script versus code versus ? Russ Microsoft ASP .NET 1 10th Jun 2004 04:06 AM
Eudora versus OE versus Incredimail James Windows XP General 2 2nd Sep 2003 01:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:38 AM.