Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Fill Down, Right, Up....
Alas, I am stuck with having users fill out Excel forms to gather
change data. In my blissful ignorance, I validated the cells for dates and such, so they could only enter what I wanted. However, they have thwarted me by cutting and pasting incorrect data into my validated cells. I figured out how to keep them from pasting into my cells, but am at a loss to how to disable the Fill commands. I want them all disabled; up, down, right, left - all of them. Ultimately, I'd like an electric shock to emanate from the keyboard when they enter something incorrectly, but I'll settle for disabling the fill function. Please help. Thanks, Verena |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Fill Down, Right, Up....
hi,
try this... CommandBars(1).Controls("Edit").Controls("Fill").V isible = False peter -----Original Message----- Alas, I am stuck with having users fill out Excel forms to gather change data. In my blissful ignorance, I validated the cells for dates and such, so they could only enter what I wanted. However, they have thwarted me by cutting and pasting incorrect data into my validated cells. I figured out how to keep them from pasting into my cells, but am at a loss to how to disable the Fill commands. I want them all disabled; up, down, right, left - all of them. Ultimately, I'd like an electric shock to emanate from the keyboard when they enter something incorrectly, but I'll settle for disabling the fill function. Please help. Thanks, Verena . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Fill Down, Right, Up....
Ooh, this didn't work so good. It does make the option disappear from
the menu, but does not inhibit Ctrl-D. It also seemed to affect Excel permanently, I had to reset the menu before it would re-appear in any workbook. "peter" wrote in message ... hi, try this... CommandBars(1).Controls("Edit").Controls("Fill").V isible = False peter |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable Fill Down, Right, Up....
Hi,
You could put that line of code in a sub so that when they open the book it would run, then, you could put the reset (=true) in a sub that runs when they close. They should be instructed not to run other books while running your book because you have taken control of the invironment. To diable the control keys you could run the following code... Dim KilledKeys As Variant Sub KillKeys() '' + = Shift ^ = Ctrl % = Alt KilledKeys = Array("+{F1}", "%{F1}", "+{F2}", "^ {F2}", "{F3}", _ "^{F3}", "+{F3}", "{F4}", "+{F4}", "^ {F4}", "{F5}", "+{F5}", _ "^{F6}", "{F7}", "^{F7}", "{F8}", "^{F8}", "+ {F8}", "{F9}", "^{F9}", _ "+{F9}", "^{F10}", "{F11}", "^{F11}", "+ {F11}", "{F12}", "^{F12}", _ "+{F12}", "^{PgDn}", "^{PgUp}") SetKeysSub KilledKeys, "" End Sub Sub SetKeysSub(KeyArray, Optional AssignedMacro As Variant) Dim Counter As Integer If IsArray(KeyArray) Then For Counter = 0 To UBound(KeyArray) If IsMissing(AssignedMacro) Then Application.OnKey KeyArray(Counter) Else Application.OnKey KeyArray(Counter), AssignedMacro End If Next Else If IsMissing(AssignedMacro) Then Application.OnKey KeyArray Else Application.OnKey KeyArray, AssignedMacro End If End If Sub ResetKilledKeys() SetKeysSub KilledKeys End Sub -- Jim Rech Excel MVP Hope this helps peter -----Original Message----- Ooh, this didn't work so good. It does make the option disappear from the menu, but does not inhibit Ctrl-D. It also seemed to affect Excel permanently, I had to reset the menu before it would re- appear in any workbook. "peter" wrote in message ... hi, try this... CommandBars(1).Controls("Edit").Controls ("Fill").Visible = False peter . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
what is the alternative for PlotArea.Fill. Fill property is hidden | New Users to Excel | |||
Fill handle fill down alternative methods question | Excel Discussion (Misc queries) | |||
Fill in form to type Item descrictions and costs and fill in funct | Excel Worksheet Functions | |||
I have a list of data, fill in the gaps. FILL function won't work | Excel Discussion (Misc queries) | |||
Disable Fill Down, Right, Up.... | Excel Programming |