LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Accessing an Excel database using Word

I have some code in a Word VBA project module that I scratched together from
Google searches that I use to import data from an Excel spreadsheet into a
Word userform.

One line of the code reads:

Set db = OpenDatabase(ThisDocument.Path & "\" & "SourceData.xls", False,
False, "Excel 8.0; IMEX=1;")

In an attempt to understand exaclty what that line of code means, I looked
up OpenDataBase in Excel help and the following was returned.

Sub UseOpenDatabase()
' Open the Northwind database in the background and create a PivotTable
Workbooks.OpenDatabase Filename:="c:\Northwind.mdb", _
CommandText:="Orders", _
CommandType:=xlCmdTable, _
BackgroundQuery:=True, _
ImportDataAs:=xlPivotTableReport
End Sub

The two don't appear to have a lot in common :-(

I understand the "FileName" piece. Can someone please explain what "False,"
"False" and "Excel 8.0; IMEX=1;" in my line of code means?

What would be the result in one of the "Falses" were changed to true? What
are some of the other values that IMEX can take. What do they mean.

Thanks.

--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org



 
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
Any macro programming sample for accessing database through Excel? Eric Excel Programming 7 May 11th 08 01:50 AM
Accessing oracle database through excel cell coeus Excel Discussion (Misc queries) 8 August 10th 06 01:48 AM
Accessing Word Constants from Excel Ken Loomis Excel Programming 4 October 28th 04 06:39 PM
Accessing Word constants in Excel Ken Loomis Excel Programming 2 October 25th 04 10:57 PM
Accessing Word from Excel pikus Excel Programming 4 January 14th 04 07:41 PM


All times are GMT +1. The time now is 06:34 AM.

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

About Us

"It's about Microsoft Excel"