can I use RunApp to open a new excel doc based on a specific templ

K

kim.in.denver

I have used the wizard to open excel but can't figure out how to tell it to
open a new doc based on the template.

This is the code produced by the wizard, where/how do I add my template name
and do I need to change anything else?

Private Sub Command17_Click()
On Error GoTo Err_Command17_Click

Dim oApp As Object

Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True

Exit_Command17_Click:
Exit Sub

Err_Command17_Click:
MsgBox Err.Description
Resume Exit_Command17_Click

End Sub
 

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