G
GrodanBoll
Hi
I have trouble reaching the code in a global template.
I get the code to execute but then I get an error.
When I use the file test.dot to create a new dokument the message box appears as it should but when I tries to close it via the Ok button I get an error message:
[error]
Run-tiem error '91':
Object variable or With block variable not set
[/error]
When I press Debug it marks the line "msgBoxen = msgBox("Hello", vbCritical)" with yellow.
In a module in code.dot (the global template)
Test.dot:
What have I done wrong?
Thanks
Grodan
I have trouble reaching the code in a global template.
I get the code to execute but then I get an error.
When I use the file test.dot to create a new dokument the message box appears as it should but when I tries to close it via the Ok button I get an error message:
[error]
Run-tiem error '91':
Object variable or With block variable not set
[/error]
When I press Debug it marks the line "msgBoxen = msgBox("Hello", vbCritical)" with yellow.
In a module in code.dot (the global template)
Code:
Public Sub TestMsg()
Dim msgBoxen As Variable
msgBoxen = msgBox("Hello", vbCritical)
End Sub
Test.dot:
Code:
Private Sub Document_New()
TestMsg
End Sub
What have I done wrong?
Thanks
Grodan