Visual Basic editor window

J

JoD

When I open my Access2003 database (in Access2007), the Visual Basic editor
window also opens. How do I prevent this from opening. The users don't need
to see the code.

I have an autoexec macro that opens the main form. The following is the macro:
Echo (Echo On: No)
Hourglass (Hourglass On: Yes)
SelectObject(Module:Sharedmodule containing function) - otherwise the
RunCode step did not work
RunCode(function in Sharedmodule)
OpenForm(MainForm,View:Normal, DataMode:Edit, WindowMode:Normal)
Close(Sharedmodule containing function)
 
D

Dirk Goldgar

JoD said:
When I open my Access2003 database (in Access2007), the Visual Basic
editor
window also opens. How do I prevent this from opening. The users don't
need
to see the code.

I have an autoexec macro that opens the main form. The following is the
macro:
Echo (Echo On: No)
Hourglass (Hourglass On: Yes)
SelectObject(Module:Sharedmodule containing function) - otherwise the
RunCode step did not work
RunCode(function in Sharedmodule)
OpenForm(MainForm,View:Normal, DataMode:Edit, WindowMode:Normal)
Close(Sharedmodule containing function)


It seems to me that it's your SelectObject action that is displaying the VB
window. I don't see why you would need to select the module at all. The
RunCode action doesn't normally require that the function to be executed, or
the module that contains it, be selected or displayed. What happens if you
just delete the SelectObject action and the Close action from the macro?
 
S

Stuart McCall

JoD said:
When I open my Access2003 database (in Access2007), the Visual Basic
editor
window also opens. How do I prevent this from opening. The users don't
need
to see the code.

I have an autoexec macro that opens the main form. The following is the
macro:
Echo (Echo On: No)
Hourglass (Hourglass On: Yes)
SelectObject(Module:Sharedmodule containing function) - otherwise the
RunCode step did not work
RunCode(function in Sharedmodule)
OpenForm(MainForm,View:Normal, DataMode:Edit, WindowMode:Normal)
Close(Sharedmodule containing function)

In your macro command SelectObject, set 'In Database Window' to Yes.
 
S

Stuart McCall

JoD said:
When I open my Access2003 database (in Access2007), the Visual Basic
editor
window also opens. How do I prevent this from opening. The users don't
need
to see the code.

I have an autoexec macro that opens the main form. The following is the
macro:
Echo (Echo On: No)
Hourglass (Hourglass On: Yes)
SelectObject(Module:Sharedmodule containing function) - otherwise the
RunCode step did not work
RunCode(function in Sharedmodule)
OpenForm(MainForm,View:Normal, DataMode:Edit, WindowMode:Normal)
Close(Sharedmodule containing function)

In your macro command SelectObject, set 'In Database Window' to Yes.
 
J

JoD

Removing the SelectObject and Close does not solve the issue of the Visual
Basic editor window from opening, unfortunately.
 
J

JoD

OK, now I am truly baffled. This time I removed both the SelectObject and the
Close actions, the Visual Basic editor window no longer opens and the reason
that I had inserted those in the macro, because the function did not seem to
run with them, no longer occurs.
 

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