ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Excel templates with GetObject/CreateObject (https://www.excelbanter.com/excel-programming/383419-using-excel-templates-getobject-createobject.html)

jille

Using Excel templates with GetObject/CreateObject
 
Hi,

I'm trying to create a file from an Excel template using either GetObject or
CreateObject. I've had success with these functions but not sure how to apply
it to a template. Currently it opens the template itself instead of creating
a new file. The template will be used by multiple users for their own data.

I had a thought that I might be able to achieve the same outcome by
'sharing' the file and then making it read-only?

Any suggestions would be appreciated.

Thx,
Jille

Charles Chickering

Using Excel templates with GetObject/CreateObject
 
I'm not quite sure what you're doing but something like this should work:
Dim wb As Workbook
Set wb = Workbooks.Add "C:\MyTemplate.xlt"

This should create a new workbook using your template.
--
Charles Chickering

"A good example is twice the value of good advice."


"jille" wrote:

Hi,

I'm trying to create a file from an Excel template using either GetObject or
CreateObject. I've had success with these functions but not sure how to apply
it to a template. Currently it opens the template itself instead of creating
a new file. The template will be used by multiple users for their own data.

I had a thought that I might be able to achieve the same outcome by
'sharing' the file and then making it read-only?

Any suggestions would be appreciated.

Thx,
Jille



All times are GMT +1. The time now is 01:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com