ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Setting a Constant when creating a new file from a template? (https://www.excelbanter.com/excel-programming/334599-setting-constant-when-creating-new-file-template.html)

Conan Kelly

Setting a Constant when creating a new file from a template?
 
Hello All,

I have a template for time sheets. I have to email these timesheets to my
supervisor on the 15th and the last day of the month. In this template (and
all files based on this template) I have code to pop up message boxes within
a few days of the end of the pay period reminding me to email the timesheet.

What I would like to be able to do is assign the pay period end date to a
constant (something like "datPayPeriodEnd"), that way when I email it to my
boss, he won't have to hassle with the pop-up messages. I plan on putting
additional message/input boxes to help automate data entry and I would like
it if my boss didn't have to hassle with these as well.

Is there a way to assign a constant when creating a new file from a
template? If so, how?

Thanks for any help anyone can provide,

Conan Kelly



Nigel

Setting a Constant when creating a new file from a template?
 
I have a similar application that uses a template, loads data and when first
opened initialises the workbook. Saves itself and then emails it to a number
of users. In the process of emailing a switch is stored on a control sheet
(very hidden from the user) that this used to turn on and off certain
functionality.

The method is as follows.

Template control sheet cell is set to 'LOAD'
Template open event reads this cell if 'LOAD' then read data etc....
Template before save event sets cell to 'RUN'
File is saved and emailed to users.
When the user opens it the control sheet cell setting of RUN is used to take
determine what the user sees and how.

This approach should work for you?

--
Cheers
Nigel



"Conan Kelly" <CTBarbarin at msn dot com wrote in message
...
Hello All,

I have a template for time sheets. I have to email these timesheets to my
supervisor on the 15th and the last day of the month. In this template

(and
all files based on this template) I have code to pop up message boxes

within
a few days of the end of the pay period reminding me to email the

timesheet.

What I would like to be able to do is assign the pay period end date to a
constant (something like "datPayPeriodEnd"), that way when I email it to

my
boss, he won't have to hassle with the pop-up messages. I plan on putting
additional message/input boxes to help automate data entry and I would

like
it if my boss didn't have to hassle with these as well.

Is there a way to assign a constant when creating a new file from a
template? If so, how?

Thanks for any help anyone can provide,

Conan Kelly






All times are GMT +1. The time now is 10:20 AM.

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