![]() |
#1
|
|||
|
|||
![]()
Maybe I should write two posts as my second problem result in a workaround for my first problem.
I recently created a quite comprehensive form for a customer with protected sections as well as unprotected ones. The protected sections consist of about 30 small tables. Each of these tables contains four checkboxes (form fields) in the first column which behave like option buttons (if one is checked, the others are automatically unchecked). Depending on the box checked in the first column, another four checkboxes (max) can be selected in the second column. Unavailable combinations are greyed and inactive. In the end some value will be calculated. This really works fine … But now the feedback from the customer: when scrolling through the document using the PgUp or PgDown key some checkboxes are activated completely arbitrary, which really can falsify the calculation. Unfortunately this behavior is reproducible … Any idea what can cause such a behavior? How can checkboxes be activated while scrolling through a document? As I wasn’t able to find the reason, I decided to disable the PgUp and PgDown key using key binding. To my great surprise, the keys are now locked in the unprotected sections of the document. Within the protected sections (the checkboxes) they are still enabled. I expected the keys to be disabled within the whole document. Am I wrong? I’m really looking forward for ANY help, as I am on my wits’ end. Thanks a lot! |
#2
|
|||
|
|||
![]()
You say the behavior is reproducible. It is possible to do so in a new, smaller, version with no sensitive client information? That would help a lot in trying to figure out what may be happening.
|
#3
|
|||
|
|||
![]()
Sure, attached you will find an anonymized version of the form.
BTW: the 'bug' also happens without EntryMacro Thanks |
#4
|
|||
|
|||
![]()
As you have NO comments in your code, and you have a number of procedures, it is going to take a bit of time to go though your code.
|
#5
|
|||
|
|||
![]()
As I wrote in my post before, the behaviour of selecting checkboxes during scrolling with PgDown also happens without any entry macro, which triggers (almost all the rest of the macros).
In the "CheckAndDisable()" and "RangeClickCheck()" macros in "p_Procedures" module (entry macros for first and second column checkboxes) you will find and a comment line "MsgBox "STOPP!" & vbCrLf & vbCrLf & Selection.FormFields(1).Name" to show which checkbox has been activated during scrolling. As this is what first happens, you can discard almost the all the rest ![]() Some of the code are just 'help constructions' I wrote today for testing. The "AllBlackAllNew()" prodedure ("ThisDocument") I use to reset the form. With the macros in the "x_DeactivateKeys" I tried to deactivate the PgUp and PgDown keys (result: keys disabled in unprotected sections, enabled in protected sections) Sorry I did not expect you to look through the whole code ... |
#6
|
|||
|
|||
![]()
@fumei
I think you need not go through the code. The strange behavior of the PgDown key during scrolling seems to be due to mixed protected and unprotected sections. I just did the following:
This behavior is reproducible, so it simply seems to be a bug. The resulting question still is: how can I prevent the user from scrolling with PgDown, as key binding does not work as I expected within the form? Thx |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding field in word in header in a bookmark in table with Excel vba Late Binding | Hdr | Excel Programming | 6 | 02-11-2013 02:58 AM |
Late Binding on SHDocVw | tinfanide | Excel Programming | 1 | 05-19-2012 10:00 PM |
![]() |
tinfanide | Word VBA | 1 | 02-03-2012 06:15 AM |
![]() |
smohap | Word | 1 | 06-19-2011 09:24 PM |
Manipulating checkboxes in XML | Ivo | Word | 0 | 12-06-2005 09:04 AM |