0
votes
2answers
44 views

Condense Table using VBA

I am really new to VBA, as I usually do most of my Excel/Access manipulation using SQL or MATLAB. (In fact, I've already solved the below problem in MATLAB) I'm trying to pull a table, representative ...
-1
votes
0answers
45 views

Delete duplicate with SQL

I have excel user form connected to access SQL My problem is when I want to delete the duplicate records as on going procedure . am using this code but it is not work without any error msg Call ...
0
votes
1answer
25 views

Opening Excel from Access, getting error 91 AFTER first successful run

I have this code in Access to open and populate an excel report. It work perfectly the first time it is run, but if I go to run it again for a different group, it gives me the run-time error 91: ...
1
vote
1answer
48 views

I need to convert backend data from an excel dashboard to access

I have a dashboard/tool which uses some backend data to populate a number of charts. These charts dynamically change with the help of VBA (drop-downs, user forms etc.). My problem is that I need to ...
0
votes
1answer
31 views

Linking and importing an Access crosstab query into Excel

Is there a code I can use by which I can import a crosstab query into Excel and also link it? Currently, these are the steps I employ to import the data from the cross tab query. Data >> Import ...
1
vote
1answer
152 views

Export Access Query to Excel with Formatting

So I have a query in access that I want to send back to excel. While using the export wizard is fine and dandy I want to add more automation to the exporting process. So far I am working on code so ...
0
votes
1answer
21 views

Error 1004 When using MacroOption Access 2007

I have an application in Access 2007 that is creating a workbook with N sheets i created a macro to be inserted into this workbook which works perfectly fine. But the next step is to add a Shortcut ...
0
votes
1answer
46 views

Access or Excel best tool for the job

Need some advice, I have a large excel sheet that I need to break up by a value in column B. The kicker is in some cases i need more then one value from column B. Example I might want A and B together ...
1
vote
1answer
41 views

Recursive saving - throwing error

I am writing a VBA script that recursively goes through and gets all the word and excel files from a directory then opens and saves them as templates then closes. Everything is working accordingly but ...
0
votes
1answer
294 views

update sharepoint list using MS Access

I have created earlier sharepoint list through excel. Users generally give data in excel which need to upload at sharepoint list. Now I got new excel with additional columns and records & want ...
0
votes
2answers
39 views

Move macro from one document to another

I created a macro in vba that makes life easier for my users. Problem is that I don't know how to port this macro so that more people can use it. Does anyone know an easy way to move a vba macro ...
0
votes
0answers
227 views

Import VBA code from a excel spreadsheet into a access form behind a button

I have an excel spreadsheet, and into that spreadsheet is a VBA script written by myself. Frequently I have to make some changes to the code and copy (ctrl-C) this code in a form behind a button (by ...
2
votes
2answers
367 views

Operation must use an Updateable Query / SQL - VBA

I am trying to create a very dynamic macro that will update different tables in a Database, depending on what the user chooses. Each table has of course distinct titles and information. I'm having a ...
0
votes
1answer
107 views

Aggregating data from Excel into Access

I am just starting on a project that will require me to aggregate data from multiple Excel files into Access tables. The tricky part is that my Excel data will not be in tables, but in a minesweeper ...
0
votes
4answers
55 views

Usage of If in VBA

In one part of my VBA code, I need to import data from excel to access. The importation is now "working" for the ovious types (string, integers). However, In the excel file i have some strings thati ...
0
votes
1answer
70 views

Import from excel to access

I am having some troubles with a VBA code that should import excel data to my access database. When i run the code, i get a RunTime error "Runtime error 1004 Application-defined or object-defined ...
1
vote
1answer
54 views

EXCEL import to Access

I am having some troubles with a VBA code that should import excel data to my access database. When i run the code, i get a RunTime error "Runtime error 438 Object doesn't support this property or ...
0
votes
1answer
154 views

How to convert this MS Excel Visual Basic code to work with MS Access

I need help converting this Visual Basic code to work with MS Access. Right now I use it in MS Excel to fill out PDFs using the data in the form and I want to migrate my data base to MS Access but ...
0
votes
2answers
222 views

Handling AddNew Key Violations ADODB.Recordset

My previous Title caused a bit of confusion there...updated I've encountered this problem recently while using some VBA to bridge Excel and Access. So I have a spreadsheet containing a table that I ...
0
votes
1answer
132 views

Stopping NULL Rows and Columns to get imported from excel to access

I am importing some table from excel to access.Sometime some blank columns also are imported as field13 or field-x . Whats the reason for that. Also sometimes some blank rows are imported also.Is ...
0
votes
0answers
127 views

Visualize relationships between entries in a database

I'm looking for a way to visualize the relationships between our suppliers by drawing a dynamic graph. Our suppliers may have one or several addresses (branches). Each branch may have one or several ...
0
votes
1answer
28 views

How to assign Single cell to range?

Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim TxtRng As Range Set TxtRng = ActiveCell If Not Intersect(Target, TxtRng) Is Nothing Then ------------Statements ...
0
votes
2answers
1k views

Setting range properly in DoCmd.TransferSpreadSheet (VBA Access in Excel)?

For Each Page In Worksheets PageName = Split(Page.Name, " ") If UBound(PageName) > 0 Then Worksheets(Page.Name).Activate LRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row ...
1
vote
1answer
1k views

VBA to insert embeded picture excel

I have seen lots of posts about us xlApp.activesheet.Pictures.Insert(strImagePath) to insert pictures into a spreadsheet with VBA, which works great. The only problem is it inserts it as a linked ...
3
votes
1answer
645 views

Export Access Table to dBase file from Excel VBA?

I have an Excel "Application" where users add/edit/etc. data. When ready, they export this data, the final deliverable needing to be a dBase file. Since Excel 2007 no longer has the Save As dBase ...
0
votes
1answer
293 views

VBA error on PageSteup.PrintArea when using Excel 2007, works fine in Excel 2003

I've inherited responsibility for a web app that uses Access for the database and Excel for the reporting (lucky me, I know). Everything has been working fine with Office 2003, however the company ...
0
votes
1answer
63 views

Cannot save file after upgrade to 2007 VBA

I have a sub which I call to save a file Sub SaveToFile() maxr = Worksheets("List").Range("H1") Worksheets("List").Range("G1:AE" & maxr).Copy Part of the code which is failing after ...
0
votes
1answer
257 views

Complex Import/Export Data Access/Excel

Our organisation has been given a spreadsheet template to do batch imports to a website. It's quite a faff for users to update as it's structured all on a single page in the following way: | ...
0
votes
0answers
590 views

Use file name variable to open Excel 2010 file from Access 2010

I need to open Excel 2010 files from Access 2010 by using a variable for the Excel file name. I can't quite figure out how to format the variable names for the file and sheet that need to be opened. ...
2
votes
1answer
2k views

VBA Excel - UPDATE record in ACCESS

I got a problem. I want to update an existing record in table in Access Database using VBA in EXCEL. My code: sqlik = "UPDATE query which works in access" Set ZAP_QUERY2 = baza.CreateQueryDef("", ...
0
votes
1answer
264 views

Unable to connect to Access database with ADO

I need to import a bunch of tables stored in .txt files into an Access database. When they are done importing, I use an ADO connection to communicate between the database and an Excel workbook. I have ...
0
votes
1answer
688 views

MS Access VBA linking data and updating records from excel

What is the best approach to updating records that are saved in an excel file. For instance I have a MS Access database with a table in it that has Product ID, ProductName, and ProductAge. I have ...
1
vote
1answer
392 views

Importing data from Excel into Access using DAO and WHERE clause

I need to import certain information from an Excel file into an Access DB and in order to do this, I am using DAO. The user gets the excel source file from a system, he does not need to directly ...
-1
votes
1answer
5k views

how to read data from an excel worksheet dynamically using VBA 2003

I am new to vba programming hence I need your expert help in trying to be able to able to read all values from the following excel sheet into a ADODB recordset object using VBA 2003 The recordset ...
0
votes
1answer
110 views

Does the recordset close itself when called from within a function?

In VBA Programming I am trying to understand the state of a recordset when it is passes data from within a function to another recordset for example Sub Test() Dim Recordset1 as new ABODB.Recordset ...
4
votes
1answer
451 views

Create a DLL for VBA Class Module or better alternative?

Here's my issue: I wrote a VBA class module that consists of commonly used methods and functions. I am continually refining the module and making changes to it. The problem is that I include this ...
0
votes
1answer
403 views

Sort/Manipulate Excel data from Access 2003 VBA

I'm trying to run a module in Access 2003 that takes an excel file, if there is info in the cell, then copy the field header and cell in A1, B1, etc... as it loops through each row. There are also ...
0
votes
0answers
123 views

How to read (query), format, and export a sheet to a existing XLS, in a Access/VBA application?

I have an introductory (?) question about Access/VBA to xls exporting. Here is my scenario: We have an Access database and a form (created in the Access environment) with some buttons where the user ...
1
vote
1answer
620 views

System Information via VBA code

I was wondering if there is any way to retrieve System Information via VBA code? Is there such a class as - SystemInfo Class in Excel VBA to do this task? thanks
1
vote
1answer
3k views

MS Office VBA changes from 2003 to 2010

in my company the IT-department finally decided to switch from MS Office 2003 to 2010. In my department we developped many small Applications running on VBA. Particularly all of them were programmed ...
0
votes
1answer
169 views

Getting different results while running the same stored Access SQL query directly and through VBA excel

Hey the following stored access query is giving POEventCode with "NA" when it is run through VBA excel and is giving the correct result when directly run from access.Why is this anomaly? SELECT ...
3
votes
1answer
1k views

mySQL-query from Microsoft Access VBA fails if not interactive?

I'm fighting with a VBA non-interactive problem that really bugs me: I have a pass-through query to a mysql database, which works well if double-clicked by the user. But it fails if called from VBA ...
1
vote
1answer
736 views

VBA to write data into excel used by multiple users on a network?

Basically i have a master workbook on a network drive which is used by many to update the sheet,i want to automate this , through my research i found there are many complications with it if i automate ...
0
votes
1answer
190 views

slow exporting array from access to excel

I have a similar performance issue to that in slow exporting from access to excel, exporting data to MS Excel by setting individual cell values looping on: objSheet.Cells(table_1_row_no + intcounter, ...
0
votes
2answers
2k views

Import data from Excel into MS Access [closed]

I have an excel file with some data, I need to import all the data into MS Access using VBA, and then run a query on it, and finally present the data in a report. How can this be acheived?
0
votes
1answer
188 views

Get value of variable used in Access report

I have a report ("rptEstimate") used as part of a larger program that runs in Access. This report has a text field, with the expression =Nz([txtTaxTotal],0)+Nz([txtSubTotal],0). Where can I find the ...
1
vote
0answers
874 views

Adding a format condition in Excel through Access VBA

So currently i got these lines in my code, .Range("C2").Formula = "=IF(B2 = """"," & """REQUIRED""" & "," & """""" & ") " .Range("C3").Formula = "=IF(B3 = """"," & """REQUIRED""" ...
23
votes
2answers
34k views

How to comment and uncomment blocks of code in the Office VBA Editor

In the VBA editor of Office (ALT + F11), how do you comment or uncomment a block of code?
0
votes
1answer
198 views

Run sub procedure in excel after values passed from MS Access record

I have an Access database which successfully passes the values in my current record to an Excel sheet. To calculate my Excel sheet I then need to call a subroutine. I think my problem is the order ...
1
vote
2answers
4k views

Excel VBA Connection to Access 2010

I have a class that's handling my connection to an Access 2003 database. I would like to setup the same thing only for Access 07/10 .accdb files. Any help is appreciated! Thank you! Here's a list of ...

15 30 50 per page