View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Using very hidden macros (plus other macros) on a shared file

You might want to consider a different approach where the code source
is an xla that uses a data.xls that users inut to. As an example...

My TimesheetManager.xla uses a login dialog over a background sheet in
the pay period file to display a user's sheet when opened. The save
process hides the current user sheet and redisplays the login dialog.
This simplifies managing user access to other sheets in the workbook
because by default all sheets but "Login" are hidden and protected, and
only their sheet gets displayed on successful login (username/password
match stored info).

Login info is stored on "UsrDat" in the xla. Each new timesheet gets
automatically populated with user info. New users are added via pg2 of
the login dialog if their name/info isn't in the UsrDat list.

Admin access to addin features also requires a separate login. This is
how user info is managed, and gives admin the option to set passwords,
add/remove users, and perform various timesheet processing tasks.
Successful login enables the 'Admin' menus for these features. When
admins logout, the default startup UI displays.

The addin is licensed (locked) to the login PC and the Payroll PC
machines. (My licensing methodology allows 2 seats per subscription,
but additional seats can be attached to a subscription as needed for
marginal cost)

Probably too much info but...

<FWIW
The addin supports both Weekly and BiWeekly pay periods. It uses an xlt
that changes every pay period (weekly), and which contain no code.
Timesheets are created from the master sheet in the xlt. This
facilitates revisons without having to tamper with the xla.

Weekly workbooks are sent to payroll. The pay period is tagged as
follows:

Today (Sep2) falls in pay period 37, which gets paid on Fri Sep9;
The workdays for this pay period are Sun Aug28 to Sat Sep03

The timesheet 'Week' field is: Aug28-Sep03 (pp37)


BiWeekly pay periods ID which week the timesheet applies to (A or B).
The timesheet 'Week' field gets populated as follows:

Today (Sep2) falls in week 'B' of pay period 19, which gets paid
on Fri Sep16;

The timesheet 'Week' field is: Aug28-Sep03 (pp19B)

All this is obtained from pay period tables within the addin. These
tables utomatically update each calendar year to match their respective
pay dates.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus