473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

VBA-help

Hi,

I have some more complicated things (for me) that I want to do in an
Access survey database. I'm totally new to VBA-syntax and I don't have
time to dig into it to much. I would appreciate any advice on the
following things that I want to do:

1. Run an external Java-progam with control of that it must be ready
before executing more code (polls mailbox and downloads encrypted
files)

2. Empty the ImportErrors Table

3. Read external file names and put it into a "macrovariable"

4. Run external program for decryption with the filenames from step 2

5. Save to another subdirectory

6. Load XML-files into Access tables (I have managed loading one but
how to load every file in a directory?)

7. Save loaded files to another subdirr

8. Count the number of files addes

9. Count the number of records added

10. Manage/trap different kind of errors

Thank you,

/Gunnar
Nov 12 '05 #1
2 2165
Gunnar Petersson wrote:
Hi,

I have some more complicated things (for me) that I want to do in an
Access survey database. I'm totally new to VBA-syntax and I don't have
time to dig into it to much. I would appreciate any advice on the
following things that I want to do:

1. Run an external Java-progam with control of that it must be ready
before executing more code (polls mailbox and downloads encrypted
files)
Will ShellExecute work?
2. Empty the ImportErrors Table
See delete queries in help.
3. Read external file names and put it into a "macrovariable"
See the word Dir in help
4. Run external program for decryption with the filenames from step 2
See ShellExecute. Goto http://www.mvps.org, AccessWeb, APIs to see how
to shell execute using API calls if you want to open a file by association.
5. Save to another subdirectory
See FileCopy
6. Load XML-files into Access tables (I have managed loading one but
how to load every file in a directory?)
See Dir to get filenames
7. Save loaded files to another subdirr
FileCopy?
8. Count the number of files addes
cnt = cnt + 1?

9. Count the number of records added
Will you use an action query called by Execute? Then see
RecordsAffected. Otherwise get a beginning count, run query, get ending
count and subtract.

10. Manage/trap different kind of errors
On Error GoTo Err_routine

Err_Routine:
select case err.number
case 123
...code
case 456
...code
case else
end select
Thank you,

/Gunnar


Nov 12 '05 #2
Gunnar Petersson wrote:
Hi,

I have some more complicated things (for me) that I want to do in an
Access survey database. I'm totally new to VBA-syntax and I don't have
time to dig into it to much. I would appreciate any advice on the
following things that I want to do:

1. Run an external Java-progam with control of that it must be ready
before executing more code (polls mailbox and downloads encrypted
files)
Will ShellExecute work?
2. Empty the ImportErrors Table
See delete queries in help.
3. Read external file names and put it into a "macrovariable"
See the word Dir in help
4. Run external program for decryption with the filenames from step 2
See ShellExecute. Goto http://www.mvps.org, AccessWeb, APIs to see how
to shell execute using API calls if you want to open a file by association.
5. Save to another subdirectory
See FileCopy
6. Load XML-files into Access tables (I have managed loading one but
how to load every file in a directory?)
See Dir to get filenames
7. Save loaded files to another subdirr
FileCopy?
8. Count the number of files addes
cnt = cnt + 1?

9. Count the number of records added
Will you use an action query called by Execute? Then see
RecordsAffected. Otherwise get a beginning count, run query, get ending
count and subtract.

10. Manage/trap different kind of errors
On Error GoTo Err_routine

Err_Routine:
select case err.number
case 123
...code
case 456
...code
case else
end select
Thank you,

/Gunnar


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: guy lateur | last post by:
Hi all, I am trying to write some code (macro's, if you like) to glue together our Office applications (mainly Word, Excel and Outlook). We have a lot of different projects going on...
1
by: Igor Mendizabal | last post by:
Hello We have a VB6 application that integrates an VBA IDE from which the final user can make modifications. We want to pass the application to VB.NET, and the first step, before rethinking...
22
by: Illya Havsiyevych | last post by:
Hello How easily parse VB/VBA code by VB/VBA code ? Is any ready solutions ? Thank's, illya
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
6
by: Ieuan | last post by:
Hello all and Happy New Year, I've been having this problem for some time and thought I'd try to see if anyone else out there has had the same problem or can give a little help. I'm using a...
1
by: Igor Mendizabal | last post by:
Hello We have a VB6 application that integrates an VBA IDE from which the final user can make modifications. We want to pass the application to VB.NET, and the first step, before rethinking...
16
by: Sathyaish | last post by:
I am expecting a VBA code module in one of the VBA apps, but much to my astonishment, I don't seem to find my way through it. It seems like I am looking at a fully compiled binary. I have an MDB...
7
by: fcolon75 | last post by:
I'm an experienced Access user, but very new to coding VBA in Access. I'd like to do the following: 1) Develop a basic query in the query designer. 2) Call that query from a VBA script 3)...
7
by: =?Utf-8?B?Z2s=?= | last post by:
I wonder how to export a call in vba from unmanaged vc++ Usually i can export function ...with stdcall In vb.net I can do that with com class. I would like to instantiate an object from vba. ie...
3
MMcCarthy
by: MMcCarthy | last post by:
Although some users find Macros simple and easy to use, there are some major limitations to using them. Although you can use macros to perform tasks, there is limited control on when and how those...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.