Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Import data using macro recorder

I decided to let the macro recorder write some code for me as I wanted to import some simple data from another Excel file. However,
the code began as follows:

With ActiveSheet.QueryTables.Add(Connection:=Array( _
"OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password=" """;User ID=Admin;Data Source=C:\Documents and
Settings\Administrator\Desktop\KoreAug.x" _
, _
"ls;Mode=Share Deny Write;Extended Properties=""HDR=YES;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet
OLEDB:Databa" _
, _
"se Password="""";Jet OLEDB:Engine Type=35;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet
OLEDB:Global B" _
, _
"ulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt
Database=False;Je" _
, _
"t OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False" _
), Destination:=Range("A1"))

I do not understand what is going on here. It is cutting words in the middle or in the middle of the extension. Then there is a
comma, and then the code continues. If I try to clean it up at all and eliminate the commas like the one after KoreAug.x" _
, _

then it indicates by turning all my code red that I have messed up the syntax. Please explain to me what is going on. This is
supposed to be a very minor part of my project. Hopefully your newsreader doesn't make matters worse with confusing additional
wrapping.

Thanks in advance!
--
RMC,CPA



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
Macro recorder Fossil_Rock Excel Discussion (Misc queries) 1 July 30th 05 08:10 PM
Help with Macro Recorder Please Hulk[_4_] Excel Programming 1 October 11th 04 10:19 PM
Help with Macro Recorder Please Hulk[_3_] Excel Programming 2 October 11th 04 04:57 AM


All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"