Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Good Day,
I have an interresting occurence with one of my models. I use input boxes (tried it with calendar sliders with same result) that use variables (to get a Date Range from a loaded field). Everyhting works fine, except that I have to click on a list box - that contains the loaded date field (or funny enough - the clear selections button) after making selections before the changes takes place. I suspect it has something to do with the Triggers - I have tried to use Select Object in my variable change - as well as Clear All Selections (to automate the "manual workaround") with no avail. Does anyone perhaps have an idea to set me in the right direction please?
 
					
				
		
I have sorted it out. In triggers I added an on change event for my variables vStartDate and vEndDate. The Subroutine looks like this:
Sub SelectDates
 
 vClick_Begin_Date = ActiveDocument.Variables("vStartDate").GetContent.String
 vClick_End_Date = ActiveDocument.Variables("vEndDate").GetContent.String
 
 if vClick_End_Date<vClick_Begin_Date then
 vClick_End_Date=vClick_Begin_Date
 set v = ActiveDocument.GetVariable("vEndDate")
 v.SetContent vClick_End_Date,true
 end if
 
 ActiveDocument.Fields("Date").Select ">="&(vClick_Begin_Date)&"<="&(vClick_End_Date)
 end sub 
 
					
				
		
It just dawned on me. I think what might have actually really solved the problem was In the Security tab under Document properties I have chosen "Macro overrides security"
