DodgerJim
Thu May 26 16:31:04 CDT 2005
I still don't have something right. I have not been using an AutoOpen()
macro. I have been using the following code in the Document Code Window of
the Microsoft Word Objects, ThisDocument:
Private Sub Document_Open()
Load frmNewForm
frmNewForm.Show
End Sub
Then in the frmNewForm I start my code in the UserForm_Initialize()
subroutine.
Where do I put the AutoOpen()?
In your example, where you have 'YourMacro()', is that where I put
'UserForm_Initialize()'?
Sorry to be such a pain, but I feel like I'm floundering in the dark! Thanks!
"axeman" wrote:
> Try having your AutoOpen macro pointing to your actual macro that does all
> the work. So you would have:
>
> Public Sub AutoOpen()
> Application.Run MacroName:="YourMacro"
> End Sub
>
> Public Sub YourMacro()
>
> Enter your code here
>
> End Sub
>
> I think that's what he meant. That he had problems running a toolbar macro
> that ran as an AutoOpen macro. Give it a twirl and let us know...
>
> Axe
> "Dodger Jim" wrote:
>
> > I don't understand 'on-time.' I read what you wrote before and didn't
> > understand that either. I guess I need more detailed specific help with how
> > to do what you're suggesting. Thanks!
> >
> > "Helmut Weber" wrote:
> >
> > > Hi Jim,
> > >
> > > was a construction using "ontime" too complicated?
> > > Did you try?
> > >
> > > If you run a macro from the VBA IDE and it works
> > > and again via automation and it doesn't, there
> > > seems to be a timing issue.
> > >
> > > I had a problem placing toolbars in autoopen.
> > > No way! The toolbars didn't exist until autoopen was finished,
> > > though I did see them.
> > >
> > > Greetings from Bavaria, Germany
> > >
> > > Helmut Weber, MVP
> > > "red.sys" & chr(64) & "t-online.de"
> > > Word XP, Win 98
> > >
http://word.mvps.org/
> > >
> > >