adodb.connection

  1. T

    Clear table in Access from Excel

    I am trying to clear the contents of a table in Access from Excel, using VBA. This code works: Option Explicit Sub DeleteDataUsingActiveX() Dim MoviesConn As ADODB.Connection Set MoviesConn = New ADODB.Connection Dim MoviesCmd As ADODB.Command Set MoviesCmd = New...
  2. C

    Excel Debug

    Having an issue trying to debug someone's work, don't know this style of coding well and so not sure what is wrong here exactly but the error it says is user-defined type not defined, and I tried fixing this by defining it as a different declaration and that didn't work. ' Connect to the...
  3. J

    Access Database Open - VBA

    The access database is not opened. How can I change this VBA code to open the access database. The code doesnt crash so I think the access database is opened in memory! Sub copydatabase() Dim jobconn As ADODB.Connection Set jobconn = New ADODB.Connection jobconn.connectionstring =...
  4. I

    Exporting Data from Excel (Dynamic Range) to Access Table

    Hi all, I am having trouble in the below code its keep getting me error on line rst.Fields(Cells(1, i).Value) = Cells(x, i).Value i dont know what the problem is please help me out. the complete code is here Sub Export_Data() Dim cnn As ADODB.Connection Dim rst As ADODB.Recordset Dim dbPath...
  5. D

    Stuck on ADODB.connection MySQL

    Hi, I am completely stuck on this one, any help will be appreciated. I have a code which is supposed to do inserts/updates in database. I have connected to database using both (one commented out): Sub SQLConnection() Dim oConn As ADODB.Connection Set oConn = New ADODB.Connection...
  6. FalconBLUE

    Connect to Protected 2007 MS Access Database mdb file

    Hi everyone, I have userform and transferring some data to closed excel files. This data collecting in MS Access mdb database and I want to protect this. I found a string from the net and I connect unprotected my mdb file successful. These codes are below but I don't know how can I connect my...
  7. J

    Export only filled cells to access

    I find an easy way to send data from excel sheet to access database with following VBA code : Sub SaveOnAccess() Dim NewCon As ADODB.Connection Set NewCon = New ADODB.Connection Dim Recordset As ADODB.Recordset Set Recordset = New ADODB.Recordset NewCon.Open...
  8. P

    Managing querytables, connections, recordsets

    HI ALL, FIRST OF ALL, SORRY ABOUT MY ENGLISH, IM NOT AMERICAN. I HAVE AN ADODB.CONNECTION, FROM I QUERY DATA USING AN ADODB.RECORDSET, SO I ADD A QUERYTABLE TO PASTE THIS DATA ON MY SHEET USING REFRESH. I HIGHLY WANT THAT THIS QUERYTABLE REFRESHS ALONE, SO THE DATA IS UPDATED WITHOUT THE NEED...
  9. P

    How to perform 'insert rows' instead of 'copy rows' using .copyrecordset (excel vba)

    I am new to excel VBA. I have a requirement where I have to copy table values from sql server 2005 to an excel worksheet. I have googled and written a code for the above requirement (listed below). In this excel sheet there are fixed set of rows which displays legends and dates. These rows...
  10. V

    ADODB.Connection : Sourcefile + if condition = error

    Hi all, I am trying to use ADODB connection stuff to read and copy data from a closed book. The code will look for an excel file, read and copy the data into the sheet "PnL_T-1". Generally the macro will read the file dated as of yesterday (Date1), but sometimes I will need the macro to read...
  11. M

    Excel vba vs crystal reports

    I am running the same query from crystal reports and excel vba. The crystal reports runs in about a second. Excel VBA takes 26 seconds. They both are going through the same ODBC connection. The query comes directly from crystal reports > Database > Show SQL query The vba code is simple...
  12. T

    Query my Access 2007 Query in Excel 2007 VBA

    Working in Access 2007 and Excel 2007.... I have an .accdb (WellCardPilot.accdb) that pulls information from multiple tables (some linked, some built into the DB). The following code works fine to return all records from a query called BridgeportWellCard to a specific worksheet in Excel (Sheet...

Some videos you may like

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top