Hello
I have a variable dim'd as an Access.Application. I have a routine that
adds a few lines of code in a module to another database. But when I open
the module from the app variable, that code window is visible! I've used
the app.visible = false, but that doesn't work. The app.docmd.openmodule
doesn't have a hidden parameter like forms and reports. How do I keep the
code window from popping up?
Here's what I've got:
dim app as Access.Applicaiton
dim sClassName as string
sclassname = "MyClass"
Set app = new Access.Application
App.Visible = False
App.OpenCurrentDatabase <dbname>
App.Visible = False
App.DoCmd.OpenModule sClassName
With App.Modules(sClassName)
.DeleteLines 1, .CountOfLines
.AddFromFile <filename>
End With
App.DoCmd.Save acModule, sClassName
App.DoCmd.Close acModule, sClassName, acSaveNo
I've tried using a module variable, using the acSaveYes option, adding
"app.visible = false" before every line, nothing seems to work.
Any ideas?
Thanks.
Matthew Wells
MW****@FirstByte.net