VBA surprise

S

Sathyaish

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 (Microsoft Access 2000) file that I am guessing is a
compiled binary written in Visual Basic for Applications (VBA).

I've done a fairly decent amount of VBA myself but mostly in the Excel,
Word and Power Point environments. This is the first time I am looking
at an Access VBA binary.

It comes as a surprise to me that, unlike other automation servers such
as Excel, Access VBA applications can be fully compiled.

I am only guessing because I haven't been able to find the source code
of the file yet.

Is it that the MDB files also are like Excel Macro modules and have the
source code inside them that I am unable to find? Or, is it that
possible that the MDB may be a binary of the VBA code? If not, how do I
get to the code editor? This application does not have any of the Tools
-> Macro menu that I am used to. It's a fully blown app written in VBA.
 
W

Wayne Morgan

An MDE file will be compiled and the text code removed. An MDB file should
still have the text code in it. Perhaps someone renamed and MDE file with an
MDB extension?

Another possibility - Are there any forms and reports in the file. Are the
tables in the file or linked tables? This could be the "back-end" file for
another database file. If so, there may not be any code in it. Are there any
code modules listed? If so, what happens if you double click them? If there
are forms and reports, can you edit them?
 
6

'69 Camaro

Hi, Sathyaish.
It comes as a surprise to me that, unlike other automation servers such
as Excel, Access VBA applications can be fully compiled.

It's possible that the database file was compiled into an MDE (Microkernel
Development Environment) database format, which removes the source code from
the file, and then the file name was changed to an MDB extension. However,
it's more likely that the Access database developer just tried to hide the
code from users. If you are unable to access design mode of modules from
the Database Window, then the file is in MDE format.

If it's not in MDE format, try to press <ALT><F11> to open the VB Editor.
If that doesn't work, then close the database file, press the <SHIFT> key
and open the file again, and continue holding the <SHIFT> key down until the
database is completely open, to bypass the startup options. Then press
<ALT><F11> to open the VB Editor.

If that doesn't work, then select the Tools -> Startup... menu to open the
Startup dialog window and ensure that the "Allow Special Access Keys" check
box is marked. Close the dialog window to save the change, then close the
database file. Open the database file again and your change will take
effect. Press said:
This application does not have any of the Tools
-> Macro menu that I am used to.

The built-in menu has been removed from display by the startup options.
You'll need to use the shift bypass key method I described above, unless
this feature has been disabled. However, that's unlikely unless the Access
database developer also applied User-level security.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top