On Mon, 30 Jul 2007 17:17:22 +0100, "Bob Phillips"
<(E-Mail Removed)> wrote:
>
>"SkippyPB" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> Is there a way to detect the column a cursor is in and make it skip to
>> the next column thus preventing entry in the original cursor position?
>
>
>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>Const WS_RANGE As String = "H1:H10" '<== change to suit
>
> If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
> Target.Offset(0, 1).Select
> End If
>
>End Sub
>
>'This is worksheet event code, which means that it needs to be
>'placed in the appropriate worksheet code module, not a standard
>'code module. To do this, right-click on the sheet tab, select
>'the View Code option from the menu, and paste the code in.
>
>
>> Also, is there a way to password protect only the macros/VBA code in a
>> workbook?
>
>Go to the VBIDE (Alt-F11), select the project, goto Tools>Project
>Properties, and there is a protection tab to set a password. Not foolproof,
>but the bset ther is in VBA.
>
Thanks for the feedback. I'll give it a try and post the results.
Regards,
////
(o o)
-oOO--(_)--OOo-
"If tin whistles are made out of tin,
what do they make fog horns out of?"
-- George Carlin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove nospam to email me.
Steve
|