Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2014, 10:55 AM
NobodysPerfect NobodysPerfect is offline Problems with a) checkboxes and b) key binding Windows 7 64bit Problems with a) checkboxes and b) key binding Office 2010 32bit
Competent Performer
Problems with a) checkboxes and b) key binding
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default Problems with a) checkboxes and b) key binding

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!
Reply With Quote
  #2  
Old 01-10-2014, 11:44 AM
fumei fumei is offline Problems with a) checkboxes and b) key binding Windows 7 64bit Problems with a) checkboxes and b) key binding Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 01-10-2014, 12:19 PM
NobodysPerfect NobodysPerfect is offline Problems with a) checkboxes and b) key binding Windows 7 64bit Problems with a) checkboxes and b) key binding Office 2010 32bit
Competent Performer
Problems with a) checkboxes and b) key binding
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

Sure, attached you will find an anonymized version of the form.

BTW: the 'bug' also happens without EntryMacro


Thanks
Attached Files
File Type: zip BugFixingVersion.zip (176.9 KB, 12 views)
Reply With Quote
  #4  
Old 01-10-2014, 02:34 PM
fumei fumei is offline Problems with a) checkboxes and b) key binding Windows 7 64bit Problems with a) checkboxes and b) key binding Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 01-10-2014, 03:00 PM
NobodysPerfect NobodysPerfect is offline Problems with a) checkboxes and b) key binding Windows 7 64bit Problems with a) checkboxes and b) key binding Office 2010 32bit
Competent Performer
Problems with a) checkboxes and b) key binding
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

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 ...
Reply With Quote
  #6  
Old 01-12-2014, 04:08 AM
NobodysPerfect NobodysPerfect is offline Problems with a) checkboxes and b) key binding Windows 7 64bit Problems with a) checkboxes and b) key binding Office 2010 32bit
Competent Performer
Problems with a) checkboxes and b) key binding
 
Join Date: Jan 2014
Location: Germany
Posts: 136
NobodysPerfect is on a distinguished road
Default

@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:
  1. · Created new document
  2. · Inserted 400 checkboxes
  3. · Protected form
  4. · Scrolled with PgDown: normal key behavior, no checkboxes checked
  5. · Inserted numerous section breakes
  6. · Protected form (all sections)
  7. · Scrolled with PgDown: normal key behavior, no checkboxes checked
  8. · Protected form (every second section protected)
  9. · Scrolled with PgDown: arbitrary checkboxes checked

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
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
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
Problems with a) checkboxes and b) key binding Binding Problems? tinfanide Word VBA 1 02-03-2012 06:15 AM
Problems with a) checkboxes and b) key binding checkboxes smohap Word 1 06-19-2011 09:24 PM
Manipulating checkboxes in XML Ivo Word 0 12-06-2005 09:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft