Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro type
I have the logic in a macro to turn off the scroll lock button, but now I'm
wondering what the macro type should be. Do I need it in two places - one at the workbook level to make sure that it is turn off once the workbook is loaded and another at the workbook change level to ensure that it doesn't get selected while in the application? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro type
Why are you turning off scroll lock. That is a setting that affects all
programs that are running. You are not only changing how XL works but how all programs work. While I am not saying don't do it I am saying be very careful here... I personally would not be heading down that path. You need to catch not only when the workbook is activated/deactivated but also when XL is activated/deactivated. -- HTH... Jim Thomlinson "Brad" wrote: I have the logic in a macro to turn off the scroll lock button, but now I'm wondering what the macro type should be. Do I need it in two places - one at the workbook level to make sure that it is turn off once the workbook is loaded and another at the workbook change level to ensure that it doesn't get selected while in the application? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro type
The end user is inputting information on a page where only selected cells
available to be changed. Having the scroll lock on is causing additional problems if the end user types information in one cell and before hitting enter uses on of the arrow keys. Turning off the scroll lock would "fix" this problem. Is there a better "fix"? I guess that if they hit an arrow key, I could tell excel to "enter" and then move. If this is better, is the code for this rather easy? "Jim Thomlinson" wrote: Why are you turning off scroll lock. That is a setting that affects all programs that are running. You are not only changing how XL works but how all programs work. While I am not saying don't do it I am saying be very careful here... I personally would not be heading down that path. You need to catch not only when the workbook is activated/deactivated but also when XL is activated/deactivated. -- HTH... Jim Thomlinson "Brad" wrote: I have the logic in a macro to turn off the scroll lock button, but now I'm wondering what the macro type should be. Do I need it in two places - one at the workbook level to make sure that it is turn off once the workbook is loaded and another at the workbook change level to ensure that it doesn't get selected while in the application? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro type
A couple of questions what version of XL are the users using? Is the sheet
protected and if not would it be ok to protect the sheet? If you protect the sheet then users can not enter data into any cells that they want, only the unlocked cells. If your users are all 2002 or better then when you protect the sheet you can select that the users can only select unlocked cells maning that they can not even select the cells they are not supposed to change. Finally if you still want to disable the arrow keys then you could use something like this... application.onkey "{Right}", "" 'diables application.oneky "{Right}" 'enables Check out this link http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx To do this you will need to still do some event programming to toggle these settings when the workbook is opened, activated or deactivated (possibly more if this is intended to be sheet specific)... -- HTH... Jim Thomlinson "Brad" wrote: The end user is inputting information on a page where only selected cells available to be changed. Having the scroll lock on is causing additional problems if the end user types information in one cell and before hitting enter uses on of the arrow keys. Turning off the scroll lock would "fix" this problem. Is there a better "fix"? I guess that if they hit an arrow key, I could tell excel to "enter" and then move. If this is better, is the code for this rather easy? "Jim Thomlinson" wrote: Why are you turning off scroll lock. That is a setting that affects all programs that are running. You are not only changing how XL works but how all programs work. While I am not saying don't do it I am saying be very careful here... I personally would not be heading down that path. You need to catch not only when the workbook is activated/deactivated but also when XL is activated/deactivated. -- HTH... Jim Thomlinson "Brad" wrote: I have the logic in a macro to turn off the scroll lock button, but now I'm wondering what the macro type should be. Do I need it in two places - one at the workbook level to make sure that it is turn off once the workbook is loaded and another at the workbook change level to ensure that it doesn't get selected while in the application? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro type
The end users will be using either XL 2003 or 2007.
The sheet is protected and appropriate cells have been "Unlocked" I would prefer not to disable the arrow keys. However, when the scroll lock in on using the arrow keys does not provide the desired effect. I understand that disabling the Scroll Lock has other effects - that is why I threw out the idea that when an arrow key is hit - VBA code would activate - pretend that the enter key would be selected and then the normal arrow key function would be performed. Do you have a better suggestion? "Jim Thomlinson" wrote: A couple of questions what version of XL are the users using? Is the sheet protected and if not would it be ok to protect the sheet? If you protect the sheet then users can not enter data into any cells that they want, only the unlocked cells. If your users are all 2002 or better then when you protect the sheet you can select that the users can only select unlocked cells maning that they can not even select the cells they are not supposed to change. Finally if you still want to disable the arrow keys then you could use something like this... application.onkey "{Right}", "" 'diables application.oneky "{Right}" 'enables Check out this link http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx To do this you will need to still do some event programming to toggle these settings when the workbook is opened, activated or deactivated (possibly more if this is intended to be sheet specific)... -- HTH... Jim Thomlinson "Brad" wrote: The end user is inputting information on a page where only selected cells available to be changed. Having the scroll lock on is causing additional problems if the end user types information in one cell and before hitting enter uses on of the arrow keys. Turning off the scroll lock would "fix" this problem. Is there a better "fix"? I guess that if they hit an arrow key, I could tell excel to "enter" and then move. If this is better, is the code for this rather easy? "Jim Thomlinson" wrote: Why are you turning off scroll lock. That is a setting that affects all programs that are running. You are not only changing how XL works but how all programs work. While I am not saying don't do it I am saying be very careful here... I personally would not be heading down that path. You need to catch not only when the workbook is activated/deactivated but also when XL is activated/deactivated. -- HTH... Jim Thomlinson "Brad" wrote: I have the logic in a macro to turn off the scroll lock button, but now I'm wondering what the macro type should be. Do I need it in two places - one at the workbook level to make sure that it is turn off once the workbook is loaded and another at the workbook change level to ensure that it doesn't get selected while in the application? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro type
When you protect the workbook are you allowing the user to select locked
cells? What is the problem if they use the arrow keys? They can use the mouse just as well... -- HTH... Jim Thomlinson "Brad" wrote: The end users will be using either XL 2003 or 2007. The sheet is protected and appropriate cells have been "Unlocked" I would prefer not to disable the arrow keys. However, when the scroll lock in on using the arrow keys does not provide the desired effect. I understand that disabling the Scroll Lock has other effects - that is why I threw out the idea that when an arrow key is hit - VBA code would activate - pretend that the enter key would be selected and then the normal arrow key function would be performed. Do you have a better suggestion? "Jim Thomlinson" wrote: A couple of questions what version of XL are the users using? Is the sheet protected and if not would it be ok to protect the sheet? If you protect the sheet then users can not enter data into any cells that they want, only the unlocked cells. If your users are all 2002 or better then when you protect the sheet you can select that the users can only select unlocked cells maning that they can not even select the cells they are not supposed to change. Finally if you still want to disable the arrow keys then you could use something like this... application.onkey "{Right}", "" 'diables application.oneky "{Right}" 'enables Check out this link http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx To do this you will need to still do some event programming to toggle these settings when the workbook is opened, activated or deactivated (possibly more if this is intended to be sheet specific)... -- HTH... Jim Thomlinson "Brad" wrote: The end user is inputting information on a page where only selected cells available to be changed. Having the scroll lock on is causing additional problems if the end user types information in one cell and before hitting enter uses on of the arrow keys. Turning off the scroll lock would "fix" this problem. Is there a better "fix"? I guess that if they hit an arrow key, I could tell excel to "enter" and then move. If this is better, is the code for this rather easy? "Jim Thomlinson" wrote: Why are you turning off scroll lock. That is a setting that affects all programs that are running. You are not only changing how XL works but how all programs work. While I am not saying don't do it I am saying be very careful here... I personally would not be heading down that path. You need to catch not only when the workbook is activated/deactivated but also when XL is activated/deactivated. -- HTH... Jim Thomlinson "Brad" wrote: I have the logic in a macro to turn off the scroll lock button, but now I'm wondering what the macro type should be. Do I need it in two places - one at the workbook level to make sure that it is turn off once the workbook is loaded and another at the workbook change level to ensure that it doesn't get selected while in the application? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop type formula - no Macro | Excel Discussion (Misc queries) | |||
Macro error type mismatch | Excel Discussion (Misc queries) | |||
macro to display items of a same type | Excel Programming | |||
Macro to do the sum at the last when ever type chages | Excel Programming | |||
Addition type macro | Excel Discussion (Misc queries) |