Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I m using Excel 10.0 (Office XP SP3). The scenario out with me is that a Visual Basic Exe Generates an Excel File. This Excel file (Will refer this Final Report further). This final report will we used by the End User. Know this final report contains a Sheet (let suppose €śSheet1€ť will be hidden sheet) this sheet contains Data in a Simple Table format (like a Sql Server has). As this is a stand alone file, that will contains macros and some buttons to initiate the macro in the Visual Basic Editor, for all other process. I want to open a connection within the same Excel file. Then the records can be fetched by using recordset for various calculations like (percentage, average) I cant use the Excel formula in this process I have used the following code for opening a connection where strDBPath =€ť C:\DATA\Automation\Excel Tool\Test.xls€ť Sub OpenExcelDatabase(strDBPath As String) Dim cnnDB As New ADODB.Connection With cnnDB .Provider = "Microsoft.Jet.OLEDB.4.0" .Properties("Extended Properties") = "Excel 8.0" .Open strDBPath End With End Sub This Code used some other Excel file (Test.xls). But over here my requirement is to open the connection with same Excel file with a Different Sheet (€śSheet1€ť) Please any one can tell me what I need to pass while opening the Connection |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ADODB Connection | Excel Worksheet Functions | |||
ADODB.Connection | Excel Programming | |||
VBA excel - problem with having clause in sql with adodb.connection/recordset | Excel Programming | |||
share adodb connection in excel | Excel Programming | |||
Virus - importing excel via adodb connection | Excel Programming |