Tagged Questions
2
votes
2answers
100 views
Using Excel VBA to Export data to Ms.Access Table
I am current using following code to export data from worksheet to Ms.Access database, the code is looping through each row and insert data to Ms.Access Table.
Public Sub TransData()
...
0
votes
1answer
29 views
Export Excel Spread Sheet to Access Table with A Timestamp?
I currently use a set up like the one below.
Set AccessConn = CreateObject("ADODB.Connection")
sExcel = "[Excel 8.0;HDR=YES;IMEX=2;DATABASE=" & ThisWorkbook.FullName & "].[Sheet1$]"
...
0
votes
1answer
61 views
Get Row number of excel using ADO
We are trying to get the row number of particular recordset retreived based on soome condtion. consider below table
Name Id
abc 1
cde 2
efg 3
Now, how to get the row number or ...
0
votes
1answer
50 views
date conversion SQL-VBA
I am getting data from SQL and pasting it to an excel sheet through VBA. The data comes in format
hh:mm:ss and I want excel to realize this is a time variable but that is not the case. Even if I ...
1
vote
1answer
54 views
over flow error ( VBA,excel that inserts data in sql database)
Here is my code in the excel sheet
Private Sub btnUpdate_Click()
On Error GoTo errH
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strPath As String
Dim ...
3
votes
1answer
204 views
Using excels named range/ object in a sql string VBScript
( I have edited this questions, see below ) I have searched on here and google but I still cannot solve my issue. I am trying to use an excel's named range equivalent in my .vbs file. This below works ...
0
votes
2answers
118 views
Unable to query named range on sheet with spaces in name in Excel
I have a workbook with multiple sheets, and each sheet has the same set of named ranges (IE they are scoped to the sheet, not workbook).
I want to query based on a named range on any of the sheets. ...
0
votes
1answer
242 views
excel 2010 vba. sql query over columns 'like' vlookup
I have a "Filename.accdb" (2010) file to which I established a connection with Excel's VBA.
Let's say that within the file I have a TableA:
Column1 Column2 Worker
------- ------- -------
Text1 ...
1
vote
2answers
460 views
Creating a temp table in SQL Server 2008 using an Excel Macro (ADODB)
After lots of Googling, I've ended up with the following macro that I hoped would connect to a database, drop any existing temp table and then create a new one (populate it, and view the results).
...
2
votes
2answers
112 views
Is there a way for VBA UDF to “know” what other functions will be run?
Assume I have a UDF that will be used in a worksheet 100,000+ times. Is there a way, within the function, for it to know how many more times it is going to be called in the batch? Basically what I ...
1
vote
1answer
112 views
How to make a list of PrimaryRowId and Matching RowIds
In my previous question (Select a distinct RowId based on series of trainnumbers) I got a nice list of RowIds.
Now I'd like to make that list complete and totally awesome! :)
My raw data(Excel 2010) ...
0
votes
1answer
52 views
Select a distinct RowId based on series of trainnumbers
I have a excel(2010) sheet with data like this:
trainnumber RowId
2 0
2 1
2 3
4 4
4 5
4 6
And I want a list like this:
RowId
0
4
...
1
vote
1answer
113 views
What could be SQL Query of a data source that is a spreadsheet, to be returned to a seperate spreadsheet? Including UDFs in the query?
I currently have a data source of a large table, sitting in workbook1. From workbook2, which is currently empty, I wish to set up a DSN connection to workbook1, so that I can query it from workbook 2. ...
0
votes
0answers
23 views
VBA recordset query on blob issue (IBM DB2) [duplicate]
Possible Duplicate:
recordset returning empty value for long varchar column DB2
Thanks for taking the time to look at this question. I have been desperately trying to figure out how to run ...
0
votes
0answers
208 views
recordset returning empty value for long varchar column DB2
I have been trying to get the recordset in vba to return a value for a column that has a type of long varchar, but it always shows up as empty/null. Every other column returns values with no problems.
...