0
votes
2answers
27 views

Check whether workbook, being accessed within MS Access via VBA, is open

I am opening a workbook from Access via VBA using the following code. I need to check whether that workbook is already open: if already open then do nothing, otherwise open it with CreateObject ...
0
votes
3answers
30 views

How can I set up an Access VBA library

I have some VBA code that I use across multiple projects - about 40 or so different data bases all use many of the same functions. I try to use the same code in application each for consistency. Is ...
0
votes
1answer
36 views

Determining a DAO Access Table Field's Format to apply to an Excel Worksheet

I am using the CopyFromRecordset command within Access to copy a series of tables into Excel. No worries with this process. My problem is making this routine be able to determine what format should be ...
0
votes
1answer
44 views

Delete all records from table - doCMD.RunSQL

I am looking to clear a local table of all records before adding new data to it. I am trying to do this using the doCMD.RunSQL command but keep receiving run time error I am guessing because of its ...
0
votes
1answer
40 views

Autofilter Excel with VBA

I would like to open Excel from Access and apply filters to a sheet. Below is my code: Dim s as String Set oApp = CreateObject("Excel.Application") oApp.Wworkbooks.Open FileName:="dudel.xlsm" ...
-2
votes
1answer
70 views

How to transfer more than 65536 rows from excel to Access - Version 2010 [duplicate]

I have the following code to transfer some rows from Excel to an Access Data Base, then it export from Access to a .txt file. The problem is that when I export it to Access, it only exports 65536 ...
0
votes
2answers
40 views

Method 'Cells' of Object'_Global' failed VBA

EDIT: i have an access application in which i need to open an existing excel sheet, find a date (already in the sheet) and populate a row (with the date cell column) with either 1 or 0 this means i ...
0
votes
1answer
24 views

Display Selection from list options to the next screen-MS Access (Data Validation, IN or IF condition)

I have a couple of lists from which particular entries can be selected. Based on the selection of entry on the first list, a second list shows up with a command button. Similarly a third one comes on. ...
0
votes
0answers
111 views

Import to Access from protected Excel sheet

Update: It turns out that I had mis-addressed the file, and this is why it wouldn't open; the protection on the sheet had nothing to do with it. Excuse me while I go and bang my head on a brick wall. ...
2
votes
2answers
55 views

How to reference a Excel Worksheet within a function

I am trying to call a excel work sheet to a function however i get an error 438 "OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD" The code below makes the call to applyStyle1 Dim wkb7 As ...
1
vote
1answer
67 views

horizontalAlignment doesn't work with xlFill

I am trying to make my column in excel fit into the column size that I give it, I am trying to use the property horizontalAlignment to do this. I can get it working with xlCenter, but I need to do ...
0
votes
1answer
94 views

VBA - Assigning an existing process to an object variable?

Sorry guys, I'm in a bit of a pickle and I don't really have the time or opportunity to research the manuals on how to get this done... I'm hoping if I ask here, someone might already know... I'm ...
0
votes
1answer
218 views

Excel VBA Sort - Error when automated from Access 2007

I wrote some code in Excel 2007 VBA, which includes some sorting, and it works fine in Excel. Now I'm trying to get it to work from Access 2007, automating Excel. When I get to the Apply method, I ...
0
votes
0answers
45 views

Closing instance

I am calling Excel objects from MS Access and I do not manage to close the instance! One would believe that the workbooks are closed because we cannot see them anymore but in task Manager --> ...
-1
votes
1answer
82 views

VBA crash CPU usage (Bloomberg data request)

I am experiencing crashes in my VBA script and I suspect the cause to be a low level of Free Physical Memory (MB) (Task Manager --> Performance). My VBA script (in Access) calls Excel objects that ...
0
votes
2answers
57 views

Application.Goto other subroutine's line error

I have in Excel this simple piece of code. If I run sub test, it takes me to the sub example and place the cursor in front of 'Hello. I want to do the same in VBA within a Ms Access 2010 module but I ...
0
votes
2answers
131 views

Automatically Close Excel Compatibility Checker window

I have a VBA module that creates 2 Excel spreadsheets based on an MS Access temp table. Each time a the second Excel spreadsheet is created, there is an Excel Compatibility Checker pop up window that ...
-1
votes
1answer
258 views

VBA - Adding records from text file to existing table in Access using button in Excel

This is my firt question here, so hello every body :) I have to write vba code in Excel (executed by button) which will add records to existing table in Access from text file. Data in text file is ...
0
votes
1answer
170 views

If table not in Access database from Excel VBA

How would I be able to check whether or not a given table (called Items) is in a specific Access database through Excel vba. I have built connections from the excel sheet to two different databases, ...
0
votes
2answers
76 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 ...
0
votes
1answer
48 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
94 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
478 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
3k 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
50 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
55 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
72 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
558 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
70 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
299 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
672 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
274 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
89 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
117 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
106 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
340 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
507 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
284 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
148 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
31 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
2k 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
5k 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
850 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
510 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
86 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
342 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
786 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
3k 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
290 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
881 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 ...

15 30 50 per page