Advanced Benefits:Dependent Coverage Start Date
Hi,
I have a an employee with the following life events.
Intially the Employee has Employee Only Option
1) 28-Feb-2010 -- New Child --> Emp+Children --> Child Cvg Start Date --28-Dec-2010
2) 01-JAN-2011 -- Open --> Emp+ Children --> Emp CVg Start Date -- 01-Jan-2011 and Dep Cvg Start Date 01-jan-2011
3) 01-APr-2011 -- Marriage --> Emp+Family --> The Cvg start date of the Child is Changed to 01-APr-2011 and the Employee CVG start date also changed to 01-apr-2011
I am curious to find why did the child coverage start date changed to 01-APr-2011 and we have added spouse only in the marriage life event and changed the
option from Emp+Children to EMp-Family
Thanks for any input.
regards,
A
Hi Shivam,
You have mentioned previously that Ct. is triggering the Gain Dep. LE by adding a new dependent child. This means that the person already had a life event in started status which enabled the Family Member page and allowed the user to add a dependent.
If so, then there might be a Collapsing Logic defined between the Current LE[Say New Hire or Open] and the Gain Dependent. [I have seen this setup with most of the Ct.'s].
So, there is a good chance that instead of the Gain Dependent, the Current LE will be reprocessed and hence is taking the setup of Current LE instead of GD.
You can confirm the LE processed in the Current Benefits page.
Regards,
Aneesh N
Similar Messages
-
Enrollment - Coverage Start Date issue
Hi All,
I am facing an issue in Selfservice, where an employee can login to SSHR to insert a life event, process it and make Enrollments.
There is one Life Event - Gain Dependent - Child, when an employee adds a dependent - Child he needs to insert the life event and on Processing it he can makes the enrollments and then save them.
On doing so the Coverage Start Date for the Benefits is coming up as Today's date (assuming if the employee makes enrollments Today).
But keeping the same setup if we Process the Life Event and make Enrollments from Oracle Forms the Coverage Start Date is coming up as 1st of the current Month, which is the actual date that should be coming up as per the Fast Formula logic.
Due to the wrong Coverage Start Date, Rate Start is also getting wrongly popualted and hence employees are losing the Dollars...
Is there any way by which this can be fixed or this is an issue with Selfservice that the what the Logic FF has cannot be used in selfservice.
Anyone having any idea on this, please reply ASAP as this is the Show Stopper issue.
Thanks
Shivam.Hi Shivam,
You have mentioned previously that Ct. is triggering the Gain Dep. LE by adding a new dependent child. This means that the person already had a life event in started status which enabled the Family Member page and allowed the user to add a dependent.
If so, then there might be a Collapsing Logic defined between the Current LE[Say New Hire or Open] and the Gain Dependent. [I have seen this setup with most of the Ct.'s].
So, there is a good chance that instead of the Gain Dependent, the Current LE will be reprocessed and hence is taking the setup of Current LE instead of GD.
You can confirm the LE processed in the Current Benefits page.
Regards,
Aneesh N -
Incorrect Coverage Start Dates
During Open Enrollment, there was an error in our set ups for our STD plan and now several employees have incorrect coverage start dates and incorrect original enrollment dates for the plan. There are over 1000 employees affected by this error so manually overriding the dates isn't a popular option to fix this problem. Is there an API that might be useful for correcting these dates ? Any other thoughts ?
Thanks in advance for your help !
JeffHi
You can review the below Metalink Note -
*Oracle Human Resources Management Systems (HRMS) Benefits Enrollment Conversion [ID 365034.1*], search '
To Create or Update Enrollments' in the Doc of this Notes.
Please let me know if you face any issue or need any informatoin, will be glad to help you.
HTH
Gaurav -
Converting Coverage Start Date during OAB Conversion for current elections
We have a requirement to convert the coverage start date of current elections in the Legacy System to OAB.
We are using 'BEN_ELECTION_INFORMATION.ELECTION_INFORMATION_W' api to convert current enrollments and is passing the actual coverage start date of the current enrollments to the parameter 'p_enrt_cvg_strt_dt' in this API. We have an administrative Life Event configured in OAB for converting the current enrollments with Assigned Life Event date as '29-JUN-2010' . After the Conversion API is executed for all the Enrollment records the coverage Start Date is set to '29-JUN-2010', which is not the requirement.
We also tried using the APIs 'BEN_PRTT_ENRT_RESULT_API.UPDATE_ENROLLMENT' and 'BEN_PRTT_ENRT_RESULT_API.UPDATE_PRTT_ENRT_RESULT', but they behave the same manner as 'the Legacy System to OAB. We are using 'BEN_ELECTION_INFORMATION.ELECTION_INFORMATION_W'.
Please let us know which API would allow us to convert the current elections without changing the actual coverage start date from the Legacy System.I did run the default enrollment process, but nothing happens. I tried this with the Assign on Default check box checked and unchecked. Here is what I have setup for the enrollment details on this plan:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Program Enrollment Requirements > General > Plan
Method: Automatic
Enrollment: Current, Keep Only; New, Can Choose
Default Enrollment:
- Code: Rule
- Rule: DEV_X
- Assign on Default: Checked
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I removed the eligibility profile from the plan and it will default when running the participation process, however that does not solve the problem. I even rewrote the rule to include plan id, but that did not work either. The employee needs to be enrolled automatically when they select a given plan. Because the person is not eligible for the plan until after they select it, OAB will not know that the person is eligible until the participation process is run.
The only thing I can think is to have a separate life event that triggers at the end of the enrollment period, but I haven't figured how to do that yet. And it still doesn't quite solve the problem completely, as will be the case when enrollments are made after the enrollment period, i.e. corrections. -
How to disable selection of End Date depending on start Date.
Hello,
I have 2 DatePicker controls
1) Start Date
2) End Date
When I select a start date in date picker depending on that it should disable the selection of dates less than Start date in End date Date Picker.
Could anyone please provide solution for it.
Thanks & regards,
ViswanathYou can always check UI5 core files and extend it. FYI, most of UI5 calendars are based on "MobileScroll" UI library, e.g.
DateTimeInput - Mobiscroll - Demos and Examples - Date & Time - Date with min and max
DatePicker - Mobiscroll 2.15.1 Documentation - Calendar
Below you can find few extension examples:
sap.m.DateTimeInput extend- JS Bin - Collaborative JavaScript Debugging</title> <link rel="alternate" type="application/jso…
sap.m.DatePicker extend -> JS Bin - Collaborative JavaScript Debugging</title> <link rel="alternate" type="application/jso…
Regards,
Vladimir -
Hello All,
I have done the configuration of all Benefits Plans. Health, Insurance, FSAs and Savings plans. I have configured dependent coverage options at plan level of each plan.
But I have not configured anything in "Dependents/ Beneficiary Eligibility" under flexible administration node.
I am able to enroll employee into Benefits Plans. But am not able to enroll dependents/ beneficiaries.
Can some one tell me where am I stuck?
Appreciate timely help.
NamrataHi,
For Health Plan, it is Dependent and for Insurance & saving plan, one should configure beneficiary..
From seeing you question and dependent coverage , i guess you are talking about the Health Plan ( EE, EE1, EEFamily )...
For health plan, one should configure...
a) benefits>Plans> Health Plans---> Define Dependent Coverage Options
where you specify EE, EE1, EEFamily... etc..
b) benefits>Plans> Health Plans---> Define Minimum and Maximum number of Dependents...
where you tie min and max number of dependents and link to subtype in infotype 21
c) Benefit->Flexible Administration->Dependent/Beneficiary Eligibilty--->Define Dependent Eligibility Rules
where you define the Age range and restriction for student and disabled... ( typically dependent child is eligible upto age 21.. For student they allow upto 25... and there is no restriction for disabled child and it also varies state to state ... you can obtain this info from your business super user )
Thanks
Anand. -
Hi All ,
I have a requirement where I have to start the suspended coverage (after certificaton is provided) . The coverge should start from 1st of next month (month after certification is provided) . I tried putting the unsuspended code(First of Month After Completed) in the "Coverage restrictions" screen in "Plan Enrollment requirements" . However is does not work and coverage does not start from 1st of next month .
Can someone please let me know , if I am something here . Any replies are appreciated .
ThanksHi,
if it's not first of month, then what is it getting to ? -
Enrollment of Benefits for a dependent and for date in the past
Hello Experts-
Can anyone let me know? What kind of changes need to be done on backend and portal for enrollment iview to enable a date in past for enrolling a dependent to the benefits..
Thanks,
Raj.
Edited by: raj1234 on Feb 25, 2011 9:16 PMThe way we have configured this as follows:
- We ask employees to first add all the dependents to the system before beginning their enrollment process.
- Adjusted the Use cases for the Dependent infotype and subtypes accordingly.
- Implemented the BADI (with custom logic for DEFAULT_DATE) HRXSS_PER_BEGDA to control the start date of the enrolled dependents.
- We control the start date of the dependent records created in various ways (birth day of dependent, employee start date, adjustment reasons, ... )
With this, we are able to provide employees with the ability to add dependents as of a past date and hence enroll dependents in Benefit plans as well.
- Shanti -
BG_ABSENCE_DURATION FF start date issue
Hi
I have created BG_ABSENCE_DURATION fast formula with the effective start date as "01-DEC-2009" by mistake. It has to be from 01-JAN-2001. If I try to delete the existing one, it is showing message that, you cannot delete the Quickpaint Type fast formula. How could I change the effective date of this fast formula to 01-JAN-2001 ?
Thanks in advance.Update the Effective Start Date from the backend.
Or you will need to delete the Formula from backend. You need to clear following tables.
FF_COMPILED_INFO_F
FF_FDI_USAGES_F
FF_FORMULAS_F_TL
FF_FORMULAS_F -
Plan Enrollment Coverage End date
There is a plan , which has following Enrollment coverage Start date and Coverage end date code resp. ( in Plan enrollment requirements)
Enterable and 1 Day Before Event.
The plan needs to be explicitly enrolled to thru ESS.
There is a reqmt such that when employee enters end date it should be such that only sysdate or later date should be allowed to be entered. So we may need to change the above setup.This has to be acheived in configuration only.
Kindly help.
Thanks,
Sush
Edited by: user10714306 on Aug 14, 2009 6:02 AMHi,
To drop the plan off employees, you have to process life event for them. If it's part of the annual process, then the enrollments will drop when the open enrollment is processed. Alternately, you will have to process an "Admin" life event for these employees.
If you are using unrestricted processing, then use admin or open to achieve the same.
IF the changes are just in dev environment, I suggest removing the plan year periods from the plan instead of making it inactive. processing life events is still necessary. Plans made inactive cannot be reverted back and so, should be done as a last resort.
Regards,
Vinayaka -
Set the dependant requirement dates to be scheduled to order start date
Dear Experts,
The components have been assigned to the relative operations in the routing.
During the lead time scheduling, is it possible to set all the required date of the components to the order start date instead of the operation start date? How to configure?
Thanks,
DawsonHi,
In lead time scheduling, the precise production times, that is, the target start date and the target finish date, are specified for materials that are produced in-house. Capacity Requirements are also created during lead time scheduling and the date that the components must be provided is also determined.
You have maintained the following parameters for lead time scheduling in Customizing for MRP by choosing Define scheduling parameters for planned orders:
Parameters for determining the routing
Parameters that determine if and how scheduling is carried out
Parameters that indicate if and how basic dates are to be adjusted
Then
You have assigned a scheduling margin key in the material master record.
You can define the scheduling margin key in Customizing for MRP by choosing Define floats (scheduling margin key).
If You Assign BOM components to the first Operation then all the components are provided on the Basic start date of the production considering all the floats
OR
In a situation where different operations are assigned with different BOM components then we define Lead time off set(+ve on u2013ve value) to have material provision on the basic start date of production order
pavan -
Shading certain columns depending on start day of week.
Good Afternoon,
I have reason to edit the calendar wizard to make it completely automated. And before anyone says that this isn't used anymore, we've received 2 separate calendar files over the last made from our Finance departments, each making them with Word calendar
wizard highlighting year end dates. So believe me, the calendar wizard is still very much in use!
Last September, I finally figured out how to automate the first day of the week, though. I have 2 templates now, one for Monday as first day and one for Sunday being the first day of the week.
The only thing missing is to automate the shading so that the columns for Saturday and Sunday are shaded with light grey, and since it's automation we're talking about, only those cells in the columns with a number in them.
I know it's do-able, I'm just not a vb expert, only being able to handle editing simple macros.
But I understand that since I had some help with the macros and they might have changed from the original to some degree, that I should post the code. Is this correct? I hope that it is.
' WORD 97 WIZARD
' Calendar Wizard Specific Code
Option Explicit
' CONSTANT DECLARATIONS
'=============================== LOCALIZATION BLOCK ===============================
' Localization Note: iWeekStartDay is the starting day of the week (Sun = 0, Mon = 1, ...Sat = 6)
Public Const iWeekStartDay As Integer = 1
' Banter strings
Public Const strWarnYearReq As String = "Both starting and ending years are required."
Public Const strWarnMinExceeded As String = "The year can not be before 1900."
Public Const strWarnMaxExceeded As String = "The year can not be after 4095."
Public Const strWarnRangeExceeded As String = "The calendar is limited to 120 months (10 years)."
Public Const strAppCaptionPart1 As String = "Calendar: "
Public Const strAppCaptionPart1b As String = ""
Public Const strAppCaptionPart2 As String = ", "
Public Const strAppCaptionPart3 As String = " to "
Public Const strAppCaptionPart4 As String = ", "
' Status messages
Public Const strStatusIntro As String = "Creating Calendar..."
Public Const strStatusPart1 As String = "Creating "
Public Const strStatusPart2 As String = ", "
Public Const strStatusPart3 As String = "..."
' Assistant
Public Const strCallBackHeading As String = "Do more with the calendar?"
'Margins for A4 size (if wizard changes pagesize to A4)
Public Const sA4_SHORT_MARGIN As Single = 28.8
Public Const sA4_LONG_MARGIN As Single = 57.6
'Margins for Letter size (if wizard changes pagesize to Letter) in pts
Public Const sLETTER_SHORT_MARGIN As Single = 36
Public Const sLETTER_LONG_MARGIN As Single = 36
'========== END LOCALIZATION BLOCK - DO NOT MAKE CHANGES BELOW THIS LINE ==========
Public Const iYearMin As Integer = 1900
Public Const iYearMax As Integer = 4095
' Bookmark Names - DO NOT LOCALIZE
' Note: No spaces allowed in bookmark names
Public Const strBkMkMonth As String = "Month"
Public Const strBkMkDays As String = "Days"
Public Const strBkMkDayNames As String = "DayNames"
Public Const strBkMkYear As String = "Year"
' Calendar Style Names and Constants
Public Const wzBOXES As Integer = 0
Public Const wzBANNER As Integer = 1
Public Const wzJAZZY As Integer = 2
' Form Control
Public Const wzPAGE_START As Integer = 0
Public Const wzPAGE_STYLE As Integer = 1
Public Const wzPAGE_DIRECTION As Integer = 2
Public Const wzPAGE_MONTHS As Integer = 3
Public Const wzPAGE_FINISH As Integer = 4
'orientation
Public Const iORTN_PORTRAIT As Integer = 0
Public Const iORTN_LANDSCAPE As Integer = 1
' Assistant
Public Const iMAX_PANEL As Integer = 4 ' Number of last panel in MultiPage (First=0)
Public Const iCALL_BACK_COUNT As Integer = 3 ' Number of items in CallBackBalloon (First=1)
'postwizard balloon document variable
Public Const strPOST_WIZ_BLN As String = "Calendar post wizard balloon"
' VARIABLE DECLARATIONS
' General
Public rgstrMonthName(11) As String
Public rgstrDayName(6) As String
Public rgiDaysInMonth(11) As String
Public fDateError As Boolean
Public fCheckValidity As Boolean 'if set then the dates are checked for validity
'variables used in doc. creation
Public str1_TO_28 As String
Public rgsDaysHeight(2, 1, 1) As Single
Public rgsMonthNamesHeight(2, 1, 1) As Single
Public rgstrDaysStyle(2) As String
Public rgstrMonthNamesStyle(2) As String
Public strSTY_BANNER_HDG3 As String
' Assistant
Public rgstrAssistantMsg(iMAX_PANEL + 1) As String
Public rgstrCallBackMsg(iCALL_BACK_COUNT) As String
Public rgstrCallBackTip(iCALL_BACK_COUNT) As String
' Page 1
Public iCalendarStyle As Integer
Public iSavedStyle As Integer
' Page 2
' Page 3
' Page 4
Public Sub InitWizardName(fDummy As Boolean)
strWizName = "Calendar Wizard"
strWizLongName = strWizName
strWizShortName = "Calendar"
End Sub
Public Sub InitWizardStrings(fDummy As Boolean)
Dim i As Integer
On Error GoTo FatalError
'=============================== LOCALIZATION BLOCK ===============================
' Note: this list is indexed 0 - iMAX_PANEL
rgstrAssistantMsg(0) = "The Calendar Wizard helps you create a monthly calendar that you can customize with pictures and events. If you want to track and be reminded of events, you should probably use Microsoft Outlook, Microsoft Schedule+, or Microsoft Exchange."
rgstrAssistantMsg(1) = "Select the look you want for your calendar. The Jazzy style uses the Algerian font. If it is not installed on your system, copy alger.ttf from the Valupack folder on the Microsoft Office CD to your hard drive."
rgstrAssistantMsg(2) = "If you leave room for a picture, Word will insert a placeholder picture that you can replace with any picture you want."
rgstrAssistantMsg(3) = "Your calendar can start on any month, and you can make your calendar shorter than or longer than 12 months. Each month will appear on a different page."
rgstrAssistantMsg(4) = "To change any settings, click Back."
' Note: change constant iCALL_BACK_COUNT if number of items in list changes
rgstrCallBackMsg(0) = "Add, remove, or replace a picture"
rgstrCallBackMsg(1) = "Enter information into the calendar"
rgstrCallBackMsg(2) = "Get Help on Something Else..."
rgstrCallBackTip(0) = "To remove a picture, click on it and then press Delete. To add a picture, click where you want to insert the picture, point to Picture on the Insert menu, and then click From File."
rgstrCallBackTip(1) = "To enter information, click where you want to insert the text and start typing. To move between different dates in the calendar, press Tab to move forward or press Shift+Tab to move to the previous date."
'Load Month Name array
rgstrMonthName(0) = "January"
rgstrMonthName(1) = "February"
rgstrMonthName(2) = "March"
rgstrMonthName(3) = "April"
rgstrMonthName(4) = "May"
rgstrMonthName(5) = "June"
rgstrMonthName(6) = "July"
rgstrMonthName(7) = "August"
rgstrMonthName(8) = "September"
rgstrMonthName(9) = "October"
rgstrMonthName(10) = "November"
rgstrMonthName(11) = "December"
'Load Day Name array LOCALIZATION NOTE: DO NOT CHANGE THE ORDER IN WHICH THESE APPEAR!
' TO CHANGE THE WEEK START DAY, CHANGE THE CONSTANT iWeekStartDay
rgstrDayName(0) = "Sun"
rgstrDayName(1) = "Mon"
rgstrDayName(2) = "Tue"
rgstrDayName(3) = "Wed"
rgstrDayName(4) = "Thu"
rgstrDayName(5) = "Fri"
rgstrDayName(6) = "Sat"
'Load Days In Month array
rgiDaysInMonth(0) = 31
rgiDaysInMonth(1) = 28 'Will not be used - must be calculated for leap year accuracy
rgiDaysInMonth(2) = 31
rgiDaysInMonth(3) = 30
rgiDaysInMonth(4) = 31
rgiDaysInMonth(5) = 30
rgiDaysInMonth(6) = 31
rgiDaysInMonth(7) = 31
rgiDaysInMonth(8) = 30
rgiDaysInMonth(9) = 31
rgiDaysInMonth(10) = 30
rgiDaysInMonth(11) = 31
rgstrDaysStyle(wzBOXES) = "Boxes"
rgstrDaysStyle(wzBANNER) = "Banner"
rgstrDaysStyle(wzJAZZY) = "Jazzy"
rgstrMonthNamesStyle(wzBOXES) = "Boxes Heading2"
rgstrMonthNamesStyle(wzBANNER) = "Banner Heading2"
'we dont set the style for month names in Jazzy style
'the Banner style landscape calendar with picture uses Banner Heading3 style for month names
strSTY_BANNER_HDG3 = "Banner Heading3"
rgsMonthNamesHeight(wzBOXES, iORTN_PORTRAIT, 0) = 55
rgsMonthNamesHeight(wzBOXES, iORTN_PORTRAIT, 1) = 55
rgsMonthNamesHeight(wzBOXES, iORTN_LANDSCAPE, 0) = 36
rgsMonthNamesHeight(wzBOXES, iORTN_LANDSCAPE, 1) = 36
rgsDaysHeight(wzBOXES, iORTN_PORTRAIT, 0) = 56
rgsDaysHeight(wzBOXES, iORTN_PORTRAIT, 1) = 102
rgsDaysHeight(wzBOXES, iORTN_LANDSCAPE, 0) = 72
rgsDaysHeight(wzBOXES, iORTN_LANDSCAPE, 1) = 71
rgsMonthNamesHeight(wzBANNER, iORTN_PORTRAIT, 0) = 60
rgsMonthNamesHeight(wzBANNER, iORTN_PORTRAIT, 1) = 60
rgsMonthNamesHeight(wzBANNER, iORTN_LANDSCAPE, 0) = 55
rgsMonthNamesHeight(wzBANNER, iORTN_LANDSCAPE, 1) = 51
rgsDaysHeight(wzBANNER, iORTN_PORTRAIT, 0) = 64
rgsDaysHeight(wzBANNER, iORTN_PORTRAIT, 1) = 110
rgsDaysHeight(wzBANNER, iORTN_LANDSCAPE, 0) = 81
rgsDaysHeight(wzBANNER, iORTN_LANDSCAPE, 1) = 81
rgsMonthNamesHeight(wzJAZZY, iORTN_PORTRAIT, 0) = 73
rgsMonthNamesHeight(wzJAZZY, iORTN_PORTRAIT, 1) = 73
rgsMonthNamesHeight(wzJAZZY, iORTN_LANDSCAPE, 0) = 62
rgsMonthNamesHeight(wzJAZZY, iORTN_LANDSCAPE, 1) = 59
rgsDaysHeight(wzJAZZY, iORTN_PORTRAIT, 0) = 40.5
rgsDaysHeight(wzJAZZY, iORTN_PORTRAIT, 1) = 81.8
rgsDaysHeight(wzJAZZY, iORTN_LANDSCAPE, 0) = 58.2
rgsDaysHeight(wzJAZZY, iORTN_LANDSCAPE, 1) = 57.5
str1_TO_28 = ""
For i = 1 To 28
str1_TO_28 = str1_TO_28 & CStr(i) & vbTab
Next i
'strip off last tab
str1_TO_28 = Left$(str1_TO_28, Len(str1_TO_28) - 1)
' Location in registry DO NOT LOCALIZE
strRegSettingsKey = strREG_SETTINGS_BASE_KEY & "Calendar Wizard"
Exit Sub
FatalError:
ReportError Err
End Sub ' InitWizardStrings
Public Sub InitWizard(fDummy As Boolean)
' Global Vars
fWizardCallBack = False
fDateError = False
iCurrentPanel = 0
' Initialize strings
InitWizardStrings (True)
' Create a new instance of the form
Set formWizard = New formWizDlg
If formWizard Is Nothing Then GoTo FatalError
formWizard.lblWizName1.Caption = " " & strWizLongName & " "
Exit Sub
FatalError:
DisplayErrorMsg strERR_INIT_FORM
ReportError Err
End Sub
' fDummy prevents sub from appearing in Word Tools/Macro list
Public Sub SaveDialogValues(fDummy As Boolean)
On Error GoTo FatalError
' Display status
Application.ScreenUpdating = False
System.Cursor = wdCursorWait
StatusBar = strSAVE_SETTINGS
' Assistant
System.PrivateProfileString("", strREG_SETTINGS_BASE_KEY, strREG_ASSISTANT_TIME_STAMP) = Format$(Now, "General Date")
StoreValPref strREG_ASSISTANT_HELP, iLocalState
' Page 1
StoreValPref "iCalendarStyle", iCalendarStyle
' Page 2
StoreValPref "optPortrait", formWizard.optPortrait.Value
StoreValPref "optPictureYes", formWizard.optPictureYes.Value
' Page 3
StatusBar = ""
System.Cursor = wdCursorNormal
fSettingsSaved = True
Application.ScreenUpdating = True
Exit Sub
FatalError:
ReportError Err
End Sub
Public Sub RestoreDialogValues(fDummy As Boolean)
Dim i As Integer
On Error GoTo FatalError
' Display status
Application.ScreenUpdating = False
StatusBar = strRST_SETTINGS
System.Cursor = wdCursorWait
' Page 1
iCalendarStyle = IRestorePref("iCalendarStyle", 0)
Select Case iCalendarStyle
Case wzBOXES
formWizard.optBoxes.Value = True
formWizard.shpShadowBoxes.Visible = True
Case wzBANNER
formWizard.optBanner.Value = True
formWizard.shpShadowBanner.Visible = True
Case wzJAZZY
formWizard.optJazzy.Value = True
formWizard.shpShadowJazzy.Visible = True
Case Else
iCalendarStyle = wzBOXES
formWizard.optBoxes.Value = True
formWizard.shpShadowBoxes.Visible = True
End Select
' Page 2
If FRestorePref("optPortrait", False) Then
formWizard.optPortrait.Value = True
formWizard.shpPortraitShadow.Visible = True
formWizard.shpLandscapeShadow.Visible = False
Else
formWizard.optLandscape.Value = True
formWizard.shpPortraitShadow.Visible = False
formWizard.shpLandscapeShadow.Visible = True
End If
formWizard.optPictureYes.Value = FRestorePref("optPictureYes", False)
' Page 3
formWizard.cboMonthStart.ListIndex = Month(Date) - 1
formWizard.cboMonthEnd.ListIndex = Month(Date) - 1
formWizard.txtYearStart = Year(Date)
formWizard.txtYearEnd = Year(Date)
fCheckValidity = False
StatusBar = ""
System.Cursor = wdCursorNormal
fSettingsRestored = True
Application.ScreenUpdating = True
Exit Sub
FatalError:
ReportError Err
Exit Sub
End Sub ' RestoreDialogValues
' fDummy prevents sub from appearing in Word Tools/Macro list
Public Sub CreateNewDoc(fDummy As Boolean)
Dim iMonthCurr As Integer
Dim iYearCurr As Integer
Dim lYearMonthCurr As Long
Dim lYearMonthEnd As Long
Dim iDaysCnt As Integer
Dim iDaysInMonth As Integer
Dim iCnt As Integer
Dim strAutoTextName As String
Dim objTableDays As Table
Dim iRow As Integer
Dim iCol As Integer
Dim ocboMonthStart As ComboBox
Dim ocboMonthEnd As ComboBox
Dim otxtYearStart As TextBox
Dim otxtYearEnd As TextBox
Dim strJazzyDayNames As String
Dim objFps As PageSetup
Dim objRng As Range
Dim sShortMargin As Single
Dim sLongMargin As Single
Dim strCaptionTxt As String
Dim iOrientation As Integer
Dim iNoPicture As Integer
Dim i As Integer
Dim strDays As String
On Error GoTo CreateNewDoc_Error
System.Cursor = wdCursorWait
Set ocboMonthStart = formWizard.cboMonthStart
Set ocboMonthEnd = formWizard.cboMonthEnd
Set otxtYearStart = formWizard.txtYearStart
Set otxtYearEnd = formWizard.txtYearEnd
With Application
.ScreenUpdating = False
.StatusBar = strStatusIntro
End With
Set objActiveRange = ActiveDocument.Content
objActiveRange.Collapse wdCollapseEnd
If (formWizard.optPortrait) Then
iOrientation = iORTN_PORTRAIT
Else
iOrientation = iORTN_LANDSCAPE
End If
iNoPicture = Abs(formWizard.optPictureNo.Value)
'the margins have to be changed if papersize was changed in Common
If (fChangeToA4 Or fChangeToLetter) Then
Set objFps = ActiveDocument.PageSetup
If iOrientation = iORTN_LANDSCAPE Then
objFps.Orientation = wdOrientLandscape 'setting paper size in common
'resets orientation to Portrait
If fChangeToA4 Then
sShortMargin = sA4_SHORT_MARGIN
sLongMargin = sA4_LONG_MARGIN
Else
sShortMargin = sLETTER_SHORT_MARGIN
sLongMargin = sLETTER_LONG_MARGIN
End If
Else
If fChangeToA4 Then
sShortMargin = sA4_LONG_MARGIN
sLongMargin = sA4_SHORT_MARGIN
Else
sShortMargin = sLETTER_LONG_MARGIN
sLongMargin = sLETTER_SHORT_MARGIN
End If
End If
With objFps
.TopMargin = sShortMargin
.BottomMargin = sShortMargin
.LeftMargin = sLongMargin
.RightMargin = sLongMargin
End With
End If
strAutoTextName = StrBuildAutoTextName(True)
objWizTemplate.AutoTextEntries(strAutoTextName).Insert objActiveRange, True
If iCalendarStyle <> wzJAZZY Then
Set objActiveRange = ActiveDocument.Bookmarks(strBkMkDays).Range
Else
Set objActiveRange = ActiveDocument.Bookmarks(strBkMkDayNames).Range
End If
strJazzyDayNames = ""
For iCnt = iWeekStartDay To 6
strJazzyDayNames = strJazzyDayNames & rgstrDayName(iCnt) & vbTab
Next
For iCnt = 0 To (iWeekStartDay - 1)
strJazzyDayNames = strJazzyDayNames & rgstrDayName(iCnt) & vbTab
Next
'Strip trailing Tab
strJazzyDayNames = Left$(strJazzyDayNames, Len(strJazzyDayNames) - 1)
objActiveRange.Text = strJazzyDayNames
If iCalendarStyle <> wzJAZZY Then
If (iCalendarStyle = wzBANNER) And (iOrientation = iORTN_LANDSCAPE) And (iNoPicture = 0) Then
objActiveRange.Style = strSTY_BANNER_HDG3
Else
objActiveRange.Style = rgstrMonthNamesStyle(iCalendarStyle)
End If
objActiveRange.Select
Selection.ConvertToTable wdSeparateByTabs, 1, 7
End If
Set objActiveRange = ActiveDocument.Content
objActiveRange.Copy
iMonthCurr = CInt(ocboMonthStart.ListIndex) + 1
iYearCurr = CInt(otxtYearStart.Text)
lYearMonthCurr = (CLng(iYearCurr) * 100) + CLng(iMonthCurr)
lYearMonthEnd = (CLng(otxtYearEnd.Text) * 100) + (CLng(ocboMonthEnd.ListIndex) + 1)
'Create each month of the calendar
Do Until lYearMonthCurr > lYearMonthEnd
Application.StatusBar = strStatusPart1 & rgstrMonthName(iMonthCurr - 1) & strStatusPart2 & CStr(iYearCurr) & strStatusPart3
'Set month
If iCalendarStyle = wzJAZZY Then
ActiveDocument.Bookmarks(strBkMkMonth).Range.Text = CStr(iMonthCurr)
Else
ActiveDocument.Bookmarks(strBkMkMonth).Range.Text = rgstrMonthName(iMonthCurr - 1)
End If
'Set year
ActiveDocument.Bookmarks(strBkMkYear).Range.Text = CStr(iYearCurr)
'Determine number of days in month
If iMonthCurr = 2 Then
iDaysInMonth = DateSerial(iYearCurr, 3, 1) - DateSerial(iYearCurr, 2, 1)
Else
iDaysInMonth = rgiDaysInMonth(iMonthCurr - 1)
End If
'Set Column of First Day Of Month by using Weekday function. The 8th
'is used (to start with) instead of the 1st to allow for offsetting (via
'iWeekStartDay) for localization since the 8th will always fall on the
'same day (of the week) as the 1st.
iCol = WeekDay(DateSerial(iYearCurr, iMonthCurr, 8 - iWeekStartDay))
ActiveDocument.Bookmarks(strBkMkDays).Select
If iCalendarStyle <> wzJAZZY Then _
Selection.MoveDown wdLine 'the bookmark is now in the first cell of the table
strDays = ""
For i = 1 To iCol - 1
strDays = strDays & vbTab
Next i
strDays = strDays & str1_TO_28
For i = 29 To iDaysInMonth
strDays = strDays & vbTab & CStr(i)
Next i
'to get a 6 * 7 table always
For i = iDaysInMonth + iCol - 1 To 41
strDays = strDays & vbTab
Next i
Set objActiveRange = Selection.Range
objActiveRange.Text = strDays
objActiveRange.Style = rgstrDaysStyle(iCalendarStyle) & iOrientation & iNoPicture
objActiveRange.Select
Selection.ConvertToTable wdSeparateByTabs, 6, 7
Selection.Cells.Height = rgsDaysHeight(iCalendarStyle, iOrientation, iNoPicture)
Selection.Tables(1).Rows(1).Height = rgsMonthNamesHeight(iCalendarStyle, iOrientation, iNoPicture)
'========================================================
' Mn.Sept.01.2014; 08h21
' TABLE GRIDLINES CODE: Automatically creates printable gridlines in the table.
With Selection.Tables(1).Borders
.InsideLineStyle = wdLineStyleSingle
.InsideLineWidth = wdLineWidth100pt
.InsideColorIndex = wdAuto
.OutsideLineStyle = wdLineStyleSingle
.OutsideLineWidth = wdLineWidth100pt
End With
'========================================================
ActiveDocument.Bookmarks(strBkMkDays).Delete
'Advance the current month
If iMonthCurr = 12 Then
iMonthCurr = 1
iYearCurr = iYearCurr + 1
Else
iMonthCurr = iMonthCurr + 1
End If
lYearMonthCurr = (CLng(iYearCurr) * 100) + CLng(iMonthCurr)
If lYearMonthCurr <= lYearMonthEnd Then
Set objActiveRange = ActiveDocument.Content
objActiveRange.Collapse wdCollapseEnd
'Insert Page Break
objActiveRange.InsertBreak wdPageBreak
Set objActiveRange = ActiveDocument.Content
objActiveRange.Collapse wdCollapseEnd
objActiveRange.Paste
End If
Loop
Application.StatusBar = ""
strCaptionTxt = ""
'Set Application caption
strCaptionTxt = " - " & strAppCaptionPart1 & strAppCaptionPart1b & ocboMonthStart.Text & strAppCaptionPart2 & otxtYearStart.Text & strAppCaptionPart3 & ocboMonthEnd.Text & strAppCaptionPart4 & otxtYearEnd.Text
ActiveDocument.UndoClear
With ActiveWindow
.Caption = .Caption & strCaptionTxt
With .View
.TableGridlines = False
.ShowDrawings = True
End With
End With
'Position cursor at the top
Selection.HomeKey wdStory
CreateNewDoc_Exit:
Exit Sub
CreateNewDoc_Error:
ReportError Err
GoTo CreateNewDoc_Exit
End Sub ' CreateNewDoc
Public Sub InitCallBack(fDummy As Boolean)
Dim i As Integer
Dim objCallBackLabels As BalloonLabels
On Error GoTo ErrorCallBack
If Not (fBlnInitialized) Then
Set objPostWizBln = Assistant.NewBalloon
fBlnInitialized = True
With objPostWizBln
.Heading = strCallBackHeading
.Mode = msoModeModeless
.Button = msoButtonSetCancel
.BalloonType = msoBalloonTypeButtons
.Callback = "Calendar.fnCallBack"
End With
Set objCallBackLabels = objPostWizBln.Labels
objCallBackLabels.Count = iCALL_BACK_COUNT
For i = 1 To iCALL_BACK_COUNT
objCallBackLabels.Item(i).Text = rgstrCallBackMsg(i - 1)
Next i
End If
objPostWizBln.Show
If (Assistant.BalloonError) Then GoTo ErrorCallBack
fPostWizBlnOpen = True
Set objDocBln = ActiveDocument
Set clsBln.app = Application
ActiveDocument.Variables.Add strPOST_WIZ_BLN, "1"
Exit Sub
ErrorCallBack:
DisplayErrorMsg strERR_INIT_CALL_BACK
fPostWizBlnOpen = False
Set objDocBln = ActiveDocument
Set clsBln.app = Application
ActiveDocument.Variables.Add strPOST_WIZ_BLN, "0"
End Sub
Public Function fnCallBack(objBln As Balloon, iBtn As Integer, lPrivate As Long)
On Error GoTo ErrorCallBack
Select Case iBtn
Case Is < 1 'Exit
objBln.Close
fPostWizBlnOpen = False
ActiveDocument.Variables(strPOST_WIZ_BLN).Value = "0"
RestoreAssistant (True)
Case 1 'Remove existing picture
DisplayTip rgstrCallBackTip(0)
Case 2 'Enter information into calendar
DisplayTip rgstrCallBackTip(1)
Case 3 ' Get help
Assistant.Help
End Select
Exit Function
ErrorCallBack:
DisplayErrorMsg Err.Description
End Function
Private Function StrBuildAutoTextName(fDummy As Boolean) As String
Dim strATName As String
On Error GoTo BuildAutoTextName_Error
'Select base AutoText Name NOTE: DO NOT LOCALIZE
Select Case iCalendarStyle
Case wzBOXES
strATName = "Boxes"
Case wzBANNER
strATName = "Banner"
Case wzJAZZY
strATName = "Jazzy"
End Select
strATName = strATName & CStr(Abs(formWizard.optLandscape.Value))
strATName = strATName & CStr(Abs(formWizard.optPictureNo.Value))
StrBuildAutoTextName = strATName
BuildAutoTextName_Exit:
Exit Function
BuildAutoTextName_Error:
StrBuildAutoTextName = ""
Resume BuildAutoTextName_Exit
End Function
'displays a tip during post-wizard options
'assumes that Assistant is present since it is called from post-wizard balloon
Private Sub DisplayTip(strTip As String)
Dim objBlnTip As Balloon
On Error GoTo FatalError
Set objBlnTip = Assistant.NewBalloon
With objBlnTip
.Mode = msoModeModal
.Heading = strWizName
.Text = strTip
.Button = msoButtonSetOK
End With
objBlnTip.Show
If Assistant.BalloonError <> msoBalloonErrorNone Then GoTo FatalError
Exit Sub
FatalError:
Err.Clear
End Sub
The above is from the module labelled "Calendar". I don't believe anything was altered in the module labelled "Common", but please let me know that I should post it.
To recap, in this wizard file, the first day of the week is set for Monday. So the Saturday and Sunday columns always fall as the last 2 columns in the calendar table (Sunday as first day has the 1st and last column as the ones that would need shading).
How can that syntax be added to shade the last 2 columns in the Monday calendar wizard, and the 1st and last column for the Sunday calendar wizard and hopefully shading just those particular cells in either with numbers in them?
Thank you! Very much appreciated.Thanks, Doug! Works beautifully. I tried them again this morning, really incredible!
I'm going to keep the Monday and Sunday wizard files as separate files because I realized that I don't have the skills (or the time) to try to figure out how to modify it so the user is requested the starting day. It'll be beyond my meager skills,
I'm sure, especially since there are all those dialogue boxes to contend with at the wizard's start. I was forgetting about those. So leaving these as 2 separate files where one chooses the starting day as per the title, the Monday one for Monday
and the other, the Sunday one, for a Sunday start day.
However, the only difference between them at this point is that one has a "0" for Sunday and the other a "1" for Monday, at the appropriate spots in the code. being the starting week day and the other a "1" for Monday.
That's it. They're beautifully the same in the rest of the code. And a further benefit is that only one module was touched at all for all of this, the Calendar module (leaving the one labelled "Common" untouched.
So anyone with a calendar wizard file can just change the piece of code below (begging the group's indulgence, if I may, in posting the modified code (??):
' WORD 97 WIZARD
' Calendar Wizard Specific Code
Option Explicit
' CONSTANT DECLARATIONS
'=============================== LOCALIZATION BLOCK ===============================
' Localization Note: iWeekStartDay is the starting day of the week (Sun = 0, Mon = 1, ...Sat = 6)
Public Const iWeekStartDay As Integer = 1
' Banter strings
Public Const strWarnYearReq As String = "Both starting and ending years are required."
Public Const strWarnMinExceeded As String = "The year can not be before 1900."
Public Const strWarnMaxExceeded As String = "The year can not be after 4095."
Public Const strWarnRangeExceeded As String = "The calendar is limited to 120 months (10 years)."
Public Const strAppCaptionPart1 As String = "Calendar: "
Public Const strAppCaptionPart1b As String = ""
Public Const strAppCaptionPart2 As String = ", "
Public Const strAppCaptionPart3 As String = " to "
Public Const strAppCaptionPart4 As String = ", "
' Status messages
Public Const strStatusIntro As String = "Creating Calendar..."
Public Const strStatusPart1 As String = "Creating "
Public Const strStatusPart2 As String = ", "
Public Const strStatusPart3 As String = "..."
' Assistant
Public Const strCallBackHeading As String = "Do more with the calendar?"
'Margins for A4 size (if wizard changes pagesize to A4)
Public Const sA4_SHORT_MARGIN As Single = 28.8
Public Const sA4_LONG_MARGIN As Single = 57.6
'Margins for Letter size (if wizard changes pagesize to Letter) in pts
Public Const sLETTER_SHORT_MARGIN As Single = 36
Public Const sLETTER_LONG_MARGIN As Single = 36
'========== END LOCALIZATION BLOCK - DO NOT MAKE CHANGES BELOW THIS LINE ==========
Public Const iYearMin As Integer = 1900
Public Const iYearMax As Integer = 4095
' Bookmark Names - DO NOT LOCALIZE
' Note: No spaces allowed in bookmark names
Public Const strBkMkMonth As String = "Month"
Public Const strBkMkDays As String = "Days"
Public Const strBkMkDayNames As String = "DayNames"
Public Const strBkMkYear As String = "Year"
' Calendar Style Names and Constants
Public Const wzBOXES As Integer = 0
Public Const wzBANNER As Integer = 1
Public Const wzJAZZY As Integer = 2
' Form Control
Public Const wzPAGE_START As Integer = 0
Public Const wzPAGE_STYLE As Integer = 1
Public Const wzPAGE_DIRECTION As Integer = 2
Public Const wzPAGE_MONTHS As Integer = 3
Public Const wzPAGE_FINISH As Integer = 4
'orientation
Public Const iORTN_PORTRAIT As Integer = 0
Public Const iORTN_LANDSCAPE As Integer = 1
' Assistant
Public Const iMAX_PANEL As Integer = 4 ' Number of last panel in MultiPage (First=0)
Public Const iCALL_BACK_COUNT As Integer = 3 ' Number of items in CallBackBalloon (First=1)
'postwizard balloon document variable
Public Const strPOST_WIZ_BLN As String = "Calendar post wizard balloon"
' VARIABLE DECLARATIONS
' General
Public rgstrMonthName(11) As String
Public rgstrDayName(6) As String
Public rgiDaysInMonth(11) As String
Public fDateError As Boolean
Public fCheckValidity As Boolean 'if set then the dates are checked for validity
'variables used in doc. creation
Public str1_TO_28 As String
Public rgsDaysHeight(2, 1, 1) As Single
Public rgsMonthNamesHeight(2, 1, 1) As Single
Public rgstrDaysStyle(2) As String
Public rgstrMonthNamesStyle(2) As String
Public strSTY_BANNER_HDG3 As String
' Assistant
Public rgstrAssistantMsg(iMAX_PANEL + 1) As String
Public rgstrCallBackMsg(iCALL_BACK_COUNT) As String
Public rgstrCallBackTip(iCALL_BACK_COUNT) As String
' Page 1
Public iCalendarStyle As Integer
Public iSavedStyle As Integer
' Page 2
' Page 3
' Page 4
Public Sub InitWizardName(fDummy As Boolean)
strWizName = "Calendar Wizard"
strWizLongName = strWizName
strWizShortName = "Calendar"
End Sub
Public Sub InitWizardStrings(fDummy As Boolean)
Dim i As Integer
On Error GoTo FatalError
'=============================== LOCALIZATION BLOCK ===============================
' Note: this list is indexed 0 - iMAX_PANEL
rgstrAssistantMsg(0) = "The Calendar Wizard helps you create a monthly calendar that you can customize with pictures and events. If you want to track and be reminded of events, you should probably use Microsoft Outlook, Microsoft Schedule+, or Microsoft Exchange."
rgstrAssistantMsg(1) = "Select the look you want for your calendar. The Jazzy style uses the Algerian font. If it is not installed on your system, copy alger.ttf from the Valupack folder on the Microsoft Office CD to your hard drive."
rgstrAssistantMsg(2) = "If you leave room for a picture, Word will insert a placeholder picture that you can replace with any picture you want."
rgstrAssistantMsg(3) = "Your calendar can start on any month, and you can make your calendar shorter than or longer than 12 months. Each month will appear on a different page."
rgstrAssistantMsg(4) = "To change any settings, click Back."
' Note: change constant iCALL_BACK_COUNT if number of items in list changes
rgstrCallBackMsg(0) = "Add, remove, or replace a picture"
rgstrCallBackMsg(1) = "Enter information into the calendar"
rgstrCallBackMsg(2) = "Get Help on Something Else..."
rgstrCallBackTip(0) = "To remove a picture, click on it and then press Delete. To add a picture, click where you want to insert the picture, point to Picture on the Insert menu, and then click From File."
rgstrCallBackTip(1) = "To enter information, click where you want to insert the text and start typing. To move between different dates in the calendar, press Tab to move forward or press Shift+Tab to move to the previous date."
'Load Month Name array
rgstrMonthName(0) = "January"
rgstrMonthName(1) = "February"
rgstrMonthName(2) = "March"
rgstrMonthName(3) = "April"
rgstrMonthName(4) = "May"
rgstrMonthName(5) = "June"
rgstrMonthName(6) = "July"
rgstrMonthName(7) = "August"
rgstrMonthName(8) = "September"
rgstrMonthName(9) = "October"
rgstrMonthName(10) = "November"
rgstrMonthName(11) = "December"
'Load Day Name array LOCALIZATION NOTE: DO NOT CHANGE THE ORDER IN WHICH THESE APPEAR!
' TO CHANGE THE WEEK START DAY, CHANGE THE CONSTANT iWeekStartDay
rgstrDayName(0) = "Sun"
rgstrDayName(1) = "Mon"
rgstrDayName(2) = "Tue"
rgstrDayName(3) = "Wed"
rgstrDayName(4) = "Thu"
rgstrDayName(5) = "Fri"
rgstrDayName(6) = "Sat"
'Load Days In Month array
rgiDaysInMonth(0) = 31
rgiDaysInMonth(1) = 28 'Will not be used - must be calculated for leap year accuracy
rgiDaysInMonth(2) = 31
rgiDaysInMonth(3) = 30
rgiDaysInMonth(4) = 31
rgiDaysInMonth(5) = 30
rgiDaysInMonth(6) = 31
rgiDaysInMonth(7) = 31
rgiDaysInMonth(8) = 30
rgiDaysInMonth(9) = 31
rgiDaysInMonth(10) = 30
rgiDaysInMonth(11) = 31
rgstrDaysStyle(wzBOXES) = "Boxes"
rgstrDaysStyle(wzBANNER) = "Banner"
rgstrDaysStyle(wzJAZZY) = "Jazzy"
rgstrMonthNamesStyle(wzBOXES) = "Boxes Heading2"
rgstrMonthNamesStyle(wzBANNER) = "Banner Heading2"
'we dont set the style for month names in Jazzy style
'the Banner style landscape calendar with picture uses Banner Heading3 style for month names
strSTY_BANNER_HDG3 = "Banner Heading3"
rgsMonthNamesHeight(wzBOXES, iORTN_PORTRAIT, 0) = 55
rgsMonthNamesHeight(wzBOXES, iORTN_PORTRAIT, 1) = 55
rgsMonthNamesHeight(wzBOXES, iORTN_LANDSCAPE, 0) = 36
rgsMonthNamesHeight(wzBOXES, iORTN_LANDSCAPE, 1) = 36
rgsDaysHeight(wzBOXES, iORTN_PORTRAIT, 0) = 56
rgsDaysHeight(wzBOXES, iORTN_PORTRAIT, 1) = 102
rgsDaysHeight(wzBOXES, iORTN_LANDSCAPE, 0) = 72
rgsDaysHeight(wzBOXES, iORTN_LANDSCAPE, 1) = 71
rgsMonthNamesHeight(wzBANNER, iORTN_PORTRAIT, 0) = 60
rgsMonthNamesHeight(wzBANNER, iORTN_PORTRAIT, 1) = 60
rgsMonthNamesHeight(wzBANNER, iORTN_LANDSCAPE, 0) = 55
rgsMonthNamesHeight(wzBANNER, iORTN_LANDSCAPE, 1) = 51
rgsDaysHeight(wzBANNER, iORTN_PORTRAIT, 0) = 64
rgsDaysHeight(wzBANNER, iORTN_PORTRAIT, 1) = 110
rgsDaysHeight(wzBANNER, iORTN_LANDSCAPE, 0) = 81
rgsDaysHeight(wzBANNER, iORTN_LANDSCAPE, 1) = 81
rgsMonthNamesHeight(wzJAZZY, iORTN_PORTRAIT, 0) = 73
rgsMonthNamesHeight(wzJAZZY, iORTN_PORTRAIT, 1) = 73
rgsMonthNamesHeight(wzJAZZY, iORTN_LANDSCAPE, 0) = 62
rgsMonthNamesHeight(wzJAZZY, iORTN_LANDSCAPE, 1) = 59
rgsDaysHeight(wzJAZZY, iORTN_PORTRAIT, 0) = 40.5
rgsDaysHeight(wzJAZZY, iORTN_PORTRAIT, 1) = 81.8
rgsDaysHeight(wzJAZZY, iORTN_LANDSCAPE, 0) = 58.2
rgsDaysHeight(wzJAZZY, iORTN_LANDSCAPE, 1) = 57.5
str1_TO_28 = ""
For i = 1 To 28
str1_TO_28 = str1_TO_28 & CStr(i) & vbTab
Next i
'strip off last tab
str1_TO_28 = Left$(str1_TO_28, Len(str1_TO_28) - 1)
' Location in registry DO NOT LOCALIZE
strRegSettingsKey = strREG_SETTINGS_BASE_KEY & "Calendar Wizard"
Exit Sub
FatalError:
ReportError Err
End Sub ' InitWizardStrings
Public Sub InitWizard(fDummy As Boolean)
' Global Vars
fWizardCallBack = False
fDateError = False
iCurrentPanel = 0
' Initialize strings
InitWizardStrings (True)
' Create a new instance of the form
Set formWizard = New formWizDlg
If formWizard Is Nothing Then GoTo FatalError
formWizard.lblWizName1.Caption = " " & strWizLongName & " "
Exit Sub
FatalError:
DisplayErrorMsg strERR_INIT_FORM
ReportError Err
End Sub
' fDummy prevents sub from appearing in Word Tools/Macro list
Public Sub SaveDialogValues(fDummy As Boolean)
On Error GoTo FatalError
' Display status
Application.ScreenUpdating = False
System.Cursor = wdCursorWait
StatusBar = strSAVE_SETTINGS
' Assistant
System.PrivateProfileString("", strREG_SETTINGS_BASE_KEY, strREG_ASSISTANT_TIME_STAMP) = Format$(Now, "General Date")
StoreValPref strREG_ASSISTANT_HELP, iLocalState
' Page 1
StoreValPref "iCalendarStyle", iCalendarStyle
' Page 2
StoreValPref "optPortrait", formWizard.optPortrait.Value
StoreValPref "optPictureYes", formWizard.optPictureYes.Value
' Page 3
StatusBar = ""
System.Cursor = wdCursorNormal
fSettingsSaved = True
Application.ScreenUpdating = True
Exit Sub
FatalError:
ReportError Err
End Sub
Public Sub RestoreDialogValues(fDummy As Boolean)
Dim i As Integer
On Error GoTo FatalError
' Display status
Application.ScreenUpdating = False
StatusBar = strRST_SETTINGS
System.Cursor = wdCursorWait
' Page 1
iCalendarStyle = IRestorePref("iCalendarStyle", 0)
Select Case iCalendarStyle
Case wzBOXES
formWizard.optBoxes.Value = True
formWizard.shpShadowBoxes.Visible = True
Case wzBANNER
formWizard.optBanner.Value = True
formWizard.shpShadowBanner.Visible = True
Case wzJAZZY
formWizard.optJazzy.Value = True
formWizard.shpShadowJazzy.Visible = True
Case Else
iCalendarStyle = wzBOXES
formWizard.optBoxes.Value = True
formWizard.shpShadowBoxes.Visible = True
End Select
' Page 2
If FRestorePref("optPortrait", False) Then
formWizard.optPortrait.Value = True
formWizard.shpPortraitShadow.Visible = True
formWizard.shpLandscapeShadow.Visible = False
Else
formWizard.optLandscape.Value = True
formWizard.shpPortraitShadow.Visible = False
formWizard.shpLandscapeShadow.Visible = True
End If
formWizard.optPictureYes.Value = FRestorePref("optPictureYes", False)
' Page 3
formWizard.cboMonthStart.ListIndex = Month(Date) - 1
formWizard.cboMonthEnd.ListIndex = Month(Date) - 1
formWizard.txtYearStart = Year(Date)
formWizard.txtYearEnd = Year(Date)
fCheckValidity = False
StatusBar = ""
System.Cursor = wdCursorNormal
fSettingsRestored = True
Application.ScreenUpdating = True
Exit Sub
FatalError:
ReportError Err
Exit Sub
End Sub ' RestoreDialogValues
' fDummy prevents sub from appearing in Word Tools/Macro list
Public Sub CreateNewDoc(fDummy As Boolean)
Dim iMonthCurr As Integer
Dim iYearCurr As Integer
Dim lYearMonthCurr As Long
Dim lYearMonthEnd As Long
Dim iDaysCnt As Integer
Dim iDaysInMonth As Integer
Dim iCnt As Integer
Dim strAutoTextName As String
Dim objTableDays As Table
Dim iRow As Integer
Dim iCol As Integer
Dim ocboMonthStart As ComboBox
Dim ocboMonthEnd As ComboBox
Dim otxtYearStart As TextBox
Dim otxtYearEnd As TextBox
Dim strJazzyDayNames As String
Dim objFps As PageSetup
Dim objRng As Range
Dim sShortMargin As Single
Dim sLongMargin As Single
Dim strCaptionTxt As String
Dim iOrientation As Integer
Dim iNoPicture As Integer
Dim i As Integer
Dim strDays As String
On Error GoTo CreateNewDoc_Error
System.Cursor = wdCursorWait
Set ocboMonthStart = formWizard.cboMonthStart
Set ocboMonthEnd = formWizard.cboMonthEnd
Set otxtYearStart = formWizard.txtYearStart
Set otxtYearEnd = formWizard.txtYearEnd
With Application
.ScreenUpdating = False
.StatusBar = strStatusIntro
End With
Set objActiveRange = ActiveDocument.Content
objActiveRange.Collapse wdCollapseEnd
If (formWizard.optPortrait) Then
iOrientation = iORTN_PORTRAIT
Else
iOrientation = iORTN_LANDSCAPE
End If
iNoPicture = Abs(formWizard.optPictureNo.Value)
'the margins have to be changed if papersize was changed in Common
If (fChangeToA4 Or fChangeToLetter) Then
Set objFps = ActiveDocument.PageSetup
If iOrientation = iORTN_LANDSCAPE Then
objFps.Orientation = wdOrientLandscape 'setting paper size in common
'resets orientation to Portrait
If fChangeToA4 Then
sShortMargin = sA4_SHORT_MARGIN
sLongMargin = sA4_LONG_MARGIN
Else
sShortMargin = sLETTER_SHORT_MARGIN
sLongMargin = sLETTER_LONG_MARGIN
End If
Else
If fChangeToA4 Then
sShortMargin = sA4_LONG_MARGIN
sLongMargin = sA4_SHORT_MARGIN
Else
sShortMargin = sLETTER_LONG_MARGIN
sLongMargin = sLETTER_SHORT_MARGIN
End If
End If
With objFps
.TopMargin = sShortMargin
.BottomMargin = sShortMargin
.LeftMargin = sLongMargin
.RightMargin = sLongMargin
End With
End If
strAutoTextName = StrBuildAutoTextName(True)
objWizTemplate.AutoTextEntries(strAutoTextName).Insert objActiveRange, True
If iCalendarStyle <> wzJAZZY Then
Set objActiveRange = ActiveDocument.Bookmarks(strBkMkDays).Range
Else
Set objActiveRange = ActiveDocument.Bookmarks(strBkMkDayNames).Range
End If
strJazzyDayNames = ""
For iCnt = iWeekStartDay To 6
strJazzyDayNames = strJazzyDayNames & rgstrDayName(iCnt) & vbTab
Next
For iCnt = 0 To (iWeekStartDay - 1)
strJazzyDayNames = strJazzyDayNames & rgstrDayName(iCnt) & vbTab
Next
'Strip trailing Tab
strJazzyDayNames = Left$(strJazzyDayNames, Len(strJazzyDayNames) - 1)
objActiveRange.Text = strJazzyDayNames
If iCalendarStyle <> wzJAZZY Then
If (iCalendarStyle = wzBANNER) And (iOrientation = iORTN_LANDSCAPE) And (iNoPicture = 0) Then
objActiveRange.Style = strSTY_BANNER_HDG3
Else
objActiveRange.Style = rgstrMonthNamesStyle(iCalendarStyle)
End If
objActiveRange.Select
Selection.ConvertToTable wdSeparateByTabs, 1, 7
End If
Set objActiveRange = ActiveDocument.Content
objActiveRange.Copy
iMonthCurr = CInt(ocboMonthStart.ListIndex) + 1
iYearCurr = CInt(otxtYearStart.Text)
lYearMonthCurr = (CLng(iYearCurr) * 100) + CLng(iMonthCurr)
lYearMonthEnd = (CLng(otxtYearEnd.Text) * 100) + (CLng(ocboMonthEnd.ListIndex) + 1)
'Create each month of the calendar
Do Until lYearMonthCurr > lYearMonthEnd
Application.StatusBar = strStatusPart1 & rgstrMonthName(iMonthCurr - 1) & strStatusPart2 & CStr(iYearCurr) & strStatusPart3
'Set month
If iCalendarStyle = wzJAZZY Then
ActiveDocument.Bookmarks(strBkMkMonth).Range.Text = CStr(iMonthCurr)
Else
ActiveDocument.Bookmarks(strBkMkMonth).Range.Text = rgstrMonthName(iMonthCurr - 1)
End If
'Set year
ActiveDocument.Bookmarks(strBkMkYear).Range.Text = CStr(iYearCurr)
'Determine number of days in month
If iMonthCurr = 2 Then
iDaysInMonth = DateSerial(iYearCurr, 3, 1) - DateSerial(iYearCurr, 2, 1)
Else
iDaysInMonth = rgiDaysInMonth(iMonthCurr - 1)
End If
'Set Column of First Day Of Month by using Weekday function. The 8th
'is used (to start with) instead of the 1st to allow for offsetting (via
'iWeekStartDay) for localization since the 8th will always fall on the
'same day (of the week) as the 1st.
iCol = WeekDay(DateSerial(iYearCurr, iMonthCurr, 8 - iWeekStartDay))
ActiveDocument.Bookmarks(strBkMkDays).Select
If iCalendarStyle <> wzJAZZY Then _
Selection.MoveDown wdLine 'the bookmark is now in the first cell of the table
strDays = ""
For i = 1 To iCol - 1
strDays = strDays & vbTab
Next i
strDays = strDays & str1_TO_28
For i = 29 To iDaysInMonth
strDays = strDays & vbTab & CStr(i)
Next i
'to get a 6 * 7 table always
For i = iDaysInMonth + iCol - 1 To 41
strDays = strDays & vbTab
Next i
Set objActiveRange = Selection.Range
objActiveRange.Text = strDays
objActiveRange.Style = rgstrDaysStyle(iCalendarStyle) & iOrientation & iNoPicture
objActiveRange.Select
Selection.ConvertToTable wdSeparateByTabs, 6, 7
Selection.Cells.Height = rgsDaysHeight(iCalendarStyle, iOrientation, iNoPicture)
Selection.Tables(1).Rows(1).Height = rgsMonthNamesHeight(iCalendarStyle, iOrientation, iNoPicture)
'================================================================================================================================
' Tu.Mar.11.2015; 17h56 - MVPEdits/MyEdits
' SATURDAY and SUNDAY cells get shaded in the table (no matter where they fall).
' Doug Robbins - Word MVP; https://social.msdn.microsoft.com/Forums/office/en-US/6ab55be0-adc0-4e37-9565-8cdff089d20a/shading-certain-columns-depending-on-start-day-of-week?forum=worddev
Dim j As Long
With Selection.Tables(1)
If iWeekStartDay = 1 Then
For i = 6 To 7
With .Columns(i)
' For j = 1 To .Cells.Count ' 1 = Cells with SAT and SUN text are shaded
For j = 2 To .Cells.Count ' 2 = Cells with SAT and SUN text are _ NOT_ shaded
With .Cells(j).Range
If Len(.Text) > 2 Then
.Shading.BackgroundPatternColor = wdColorGray20 'wdColorGray_ _ _ (the number following gives the shade of gray, i.e., wdColorGray20 vs. wdColorGray50)
End If
End With
Next j
End With
Next i
Else
For i = 1 To 7 Step 6
With .Columns(i)
' For j = 1 To .Cells.Count ' 1 = Cells with SAT and SUN text are shaded
For j = 2 To .Cells.Count ' 2 = Cells with SAT and SUN text are _ NOT_ shaded
With .Cells(j).Range
If Len(.Text) > 2 Then
.Shading.BackgroundPatternColor = wdColorGray20 'wdColorGray_ _ _ (the number following gives the shade of gray, i.e., wdColorGray20 vs. wdColorGray50)
End If
End With
Next j
End With
Next i
End If
End With
'================================================================================================================================
'================================================================================================================================
' Mn.Sept.01.2014; 08h21 - MVPEdits/MyEdits
' TABLE GRIDLINES CODE: Automatically creates printable gridlines in the table.
With Selection.Tables(1).Borders
.InsideLineStyle = wdLineStyleSingle
.InsideLineWidth = wdLineWidth100pt
.InsideColorIndex = wdAuto
.OutsideLineStyle = wdLineStyleSingle
.OutsideLineWidth = wdLineWidth100pt
End With
'================================================================================================================================
ActiveDocument.Bookmarks(strBkMkDays).Delete
'Advance the current month
If iMonthCurr = 12 Then
iMonthCurr = 1
iYearCurr = iYearCurr + 1
Else
iMonthCurr = iMonthCurr + 1
End If
lYearMonthCurr = (CLng(iYearCurr) * 100) + CLng(iMonthCurr)
If lYearMonthCurr <= lYearMonthEnd Then
Set objActiveRange = ActiveDocument.Content
objActiveRange.Collapse wdCollapseEnd
'Insert Page Break
objActiveRange.InsertBreak wdPageBreak
Set objActiveRange = ActiveDocument.Content
objActiveRange.Collapse wdCollapseEnd
objActiveRange.Paste
End If
Loop
Application.StatusBar = ""
strCaptionTxt = ""
'Set Application caption
strCaptionTxt = " - " & strAppCaptionPart1 & strAppCaptionPart1b & ocboMonthStart.Text & strAppCaptionPart2 & otxtYearStart.Text & strAppCaptionPart3 & ocboMonthEnd.Text & strAppCaptionPart4 & otxtYearEnd.Text
ActiveDocument.UndoClear
With ActiveWindow
.Caption = .Caption & strCaptionTxt
With .View
.TableGridlines = False
.ShowDrawings = True
End With
End With
'Position cursor at the top
Selection.HomeKey wdStory
CreateNewDoc_Exit:
Exit Sub
CreateNewDoc_Error:
ReportError Err
GoTo CreateNewDoc_Exit
End Sub ' CreateNewDoc
Public Sub InitCallBack(fDummy As Boolean)
Dim i As Integer
Dim objCallBackLabels As BalloonLabels
On Error GoTo ErrorCallBack
If Not (fBlnInitialized) Then
Set objPostWizBln = Assistant.NewBalloon
fBlnInitialized = True
With objPostWizBln
.Heading = strCallBackHeading
.Mode = msoModeModeless
.Button = msoButtonSetCancel
.BalloonType = msoBalloonTypeButtons
.Callback = "Calendar.fnCallBack"
End With
Set objCallBackLabels = objPostWizBln.Labels
objCallBackLabels.Count = iCALL_BACK_COUNT
For i = 1 To iCALL_BACK_COUNT
objCallBackLabels.Item(i).Text = rgstrCallBackMsg(i - 1)
Next i
End If
objPostWizBln.Show
If (Assistant.BalloonError) Then GoTo ErrorCallBack
fPostWizBlnOpen = True
Set objDocBln = ActiveDocument
Set clsBln.app = Application
ActiveDocument.Variables.Add strPOST_WIZ_BLN, "1"
Exit Sub
ErrorCallBack:
DisplayErrorMsg strERR_INIT_CALL_BACK
fPostWizBlnOpen = False
Set objDocBln = ActiveDocument
Set clsBln.app = Application
ActiveDocument.Variables.Add strPOST_WIZ_BLN, "0"
End Sub
Public Function fnCallBack(objBln As Balloon, iBtn As Integer, lPrivate As Long)
On Error GoTo ErrorCallBack
Select Case iBtn
Case Is < 1 'Exit
objBln.Close
fPostWizBlnOpen = False
ActiveDocument.Variables(strPOST_WIZ_BLN).Value = "0"
RestoreAssistant (True)
Case 1 'Remove existing picture
DisplayTip rgstrCallBackTip(0)
Case 2 'Enter information into calendar
DisplayTip rgstrCallBackTip(1)
Case 3 ' Get help
Assistant.Help
End Select
Exit Function
ErrorCallBack:
DisplayErrorMsg Err.Description
End Function
Private Function StrBuildAutoTextName(fDummy As Boolean) As String
Dim strATName As String
On Error GoTo BuildAutoTextName_Error
'Select base AutoText Name NOTE: DO NOT LOCALIZE
Select Case iCalendarStyle
Case wzBOXES
strATName = "Boxes"
Case wzBANNER
strATName = "Banner"
Case wzJAZZY
strATName = "Jazzy"
End Select
strATName = strATName & CStr(Abs(formWizard.optLandscape.Value))
strATName = strATName & CStr(Abs(formWizard.optPictureNo.Value))
StrBuildAutoTextName = strATName
BuildAutoTextName_Exit:
Exit Function
BuildAutoTextName_Error:
StrBuildAutoTextName = ""
Resume BuildAutoTextName_Exit
End Function
'displays a tip during post-wizard options
'assumes that Assistant is present since it is called from post-wizard balloon
Private Sub DisplayTip(strTip As String)
Dim objBlnTip As Balloon
On Error GoTo FatalError
Set objBlnTip = Assistant.NewBalloon
With objBlnTip
.Mode = msoModeModal
.Heading = strWizName
.Text = strTip
.Button = msoButtonSetOK
End With
objBlnTip.Show
If Assistant.BalloonError <> msoBalloonErrorNone Then GoTo FatalError
Exit Sub
FatalError:
Err.Clear
End Sub
Thank you once again for all your help!! Very much appreciated. :D -
Sched.start date not allowing on week-ends for fwd scheduling process order
Hello Experts,
For a process order & scheduling typr forward/in time if I take sat or sunday as a start date then if I click on schedule, system changes it to previous workin day (friday). But however if i select backward/in time scheduling type & put week ends as finish day then system does not change this date.
How can I make system to allow schedule start date on week ends also for forward/in time scheduling type. in a factory calendor sat & sunday are holidays. while for work center, calender sat & sunday are marked as working days.
Thanks for advance,
Vijay.Hi
it depends upon client requirement.you must have defined the holiday calender as well.if you select the public holidays in your factory calender.then system will allow you to do your daily transctions on public holidays as well and vice versa.so better go with all options selected .and plz check at your end
plz revert back if it works
Regards
Anupam Sharma -
Multi counter plan schduling start date
Dear Experts,
Anyone can clarify the following points to provide proper support to client.
1. we have created multi counter plan with cycle set contains of different target counter readings with logical condition OR.
2. Now users are recording the counters via measuring documents.
3. we are mannually scheduling the above M.Plan. System is deriving the order start date on its own. we want to know the basis behind deriving the order start date? userrs wants starting date on its own, can system will support with ant exit?
4. what is the significance of annual estimate reading in the measuring point? how it help to derive the planned start date of M.Order?
5. users also wants that, system should check measuring documents on its own while creating measuring documents and should result the order if it crosses the limit of the cycle set mentioned in the M.Plan. Is it possible to support the scenario?
Thanks in Advance,
KrishnamurthyKrishnamurthy,
3) Do a manual call of the Maintenance plan, this would be the easiest way, instead of using exits
4) For performance based MP,The [calculated planned date|http://help.sap.com/erp2005_ehp_04/helpdata/EN/3c/abb1ec413911d1893d0000e8323c4f/frameset.htm] depends on the counter reading at the time of planning, and the estimated annual performance that has been defined for the counter.Hence it is important that you enter measurement readings for the counter,e even-though the reading has not changed.
5) With respect to your last question, That functionality is accomplished through Condition based maintenance functionality. You will have to use the user exit to generate a order when the reading falls outside pre-determined values.
Regards
Narasimhan -
HRMS Advanced Benefits, Create Potential Life Event for Current Life Event
Hi,
While converting historical benefit information to Advanced Benefits module there is a step to Create Potential Life Event of Current Life Event.
Per my understanding a Life Event is Change in marital status to add spouse or having a child for benefits. What is Potential Life Event?
Thanks,In advanced benefits all the data is stored on person in life event basis (BEN_PER_IN_LER) which is a combination of person and life event.
So when ever any event occur in a person life it is trigger as a potential life event. After successful processing of life event life event data moves to person in life event which will further has transaction data attached to the life event like enrollments, rates, beneficiaries or depenedents.
e.g like a person hires and add dependent at the same time there will be two life events "New Hire" and "Add Dependent". These are both potential life events. Once you run the participation process or run the life events only one might be processed (the way you set ur collapsing rules).
I hope it clears some doubts. Drop a comment if you have some questions
Maybe you are looking for
-
About inventory opening balance & closing balance
hi all, i want to opening balace and closing balance date wise in my query. how to do it? regards, chetan.
-
Garbage display of table names after droping.
Hi to all, i installed oracle 10g on linux and configure the server- client for the users. recently one of my user created a table and then droped it i found the following display after executing SELECT * FROM TAB; TNAME TABTYPE CLUSTERID REGIONS TAB
-
Oracle XE installation (TNS:protocl adapter error)
Hi, I have been reading through all emails regarding installing Oracle 10g XE. I have successfully installed XE on Windows XP on first attempt with no problems. Next, I have to install on Windows 2000 but during the Installation process Task 1 of 5 e
-
My son and I have our own iPods. His is the last Mini that came out and I have the 5th Gen Nano. Can we both synch our own songs using the same PC but not affect our own lists? Thanks.
-
Archive Link for outgoing FI documents (correspondence)
Is there anyone that has already implemented the Archiving of FI correspondence using BTE (business transaction events)? I don't understand if I have to use just archiving function (for instance FI_OPT_ARCHIVE_CORRESPONDENCE) or I need also to activa