You could use a double-click event instead.
Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Target.Address = "$E$2" Then Target = 234
Cancel = True
End Sub
Gord Dibben MS Excel MVP
On Mon, 26 Jan 2009 13:42:33 -0800, PawlingJohn
<(E-Mail Removed)> wrote:
>One last question. How can i do this so that only a click will insert the
>desired input. Now whenever i tab past the field the value goes into it.
>
>"Don Guillett" wrote:
>
>> Glad you got it figured out.
>>
>> --
>> Don Guillett
>> Microsoft MVP Excel
>> SalesAid Software
>> (E-Mail Removed)
>> "pawlingJohn" <(E-Mail Removed)> wrote in message
>> news:34982546-E02D-45A9-8A15-(E-Mail Removed)...
>> > Opps!!! I have to put the X in quotes.
>> >
>> > Thanks a millions Don.
>> >
>> > "Don Guillett" wrote:
>> >
>> >> Right click the sheet tab>view code>copy/paste this.
>> >> Now when you select cell E2 the number 234 will appear in that cell.
>> >>
>> >> --
>> >> Don Guillett
>> >> Microsoft MVP Excel
>> >> SalesAid Software
>> >> (E-Mail Removed)
>> >> "pawlingJohn" <(E-Mail Removed)> wrote in message
>> >> news:F98C03C6-4B9E-42B1-B9F6-(E-Mail Removed)...
>> >> > Don,
>> >> >
>> >> > Thanks for the quick reply but i have never worked with VB and am not
>> >> > sure
>> >> > what to do once I put the code in.
>> >> >
>> >> > "Don Guillett" wrote:
>> >> >
>> >> >> Try using
>> >> >>
>> >> >> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>> >> >> If Target.Address = "$E$2" Then Target = 234
>> >> >> End Sub
>> >> >> --
>> >> >> Don Guillett
>> >> >> Microsoft MVP Excel
>> >> >> SalesAid Software
>> >> >> (E-Mail Removed)
>> >> >> "pawlingJohn" <(E-Mail Removed)> wrote in message
>> >> >> news:56E03EF1-994C-436F-91DD-(E-Mail Removed)...
>> >> >> >I would like to be able to click on a cell and have a value
>> >> >> >automatically
>> >> >> > entered. I would like this to work like a forms control checkbox.
>> >> >> > Or
>> >> >> > is
>> >> >> > my
>> >> >> > only answer use the control checkbox?
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>