setting the focus using VB

  • Thread starter Thread starter Yan Robidoux
  • Start date Start date
Y

Yan Robidoux

hello to you all...

well i have an application that place and sort data in a worksheet. i
work perfectly except for one small thing. the user got to clik in
cell to call the sub (i used worksheet_selectionchange). proble is :

if the user want to enter another value he got to clik elsewere the
clik back into the appropriate cell to bring selectionchange in actio
again. thus i would like to set the focus elsewhere, let say a1, at th
end of my application so the user would only need clik into th
appropriate cell.

so how do i set focus elsewhere ? thanks...

ya
 
never mind i found what i was looking for :

range("XX"). select

but thanks anyway for taking the time to read this...
 
Hi Yan

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 Then
'whatever
Cells(1, 1).Select
End If
End Sub

HTH. Best wishes Harald
 
well i just entered something similar range("a1").select wich remove th
focus from the said cell (actually it F4:H8) ...

but thank for your reply anyway man.... i really of all the help i'v
gotten here. Thanks guy and keep going it really apreciated...
 
Yan Robidoux > said:
well i just entered something similar range("a1").select wich remove the
focus from the said cell (actually it F4:H8) ...

Good. It's the same thing, I just happen to think in R1C1 reference style
while programming. An old Jack Daniels wound, I guess :-)

Best wishes Harald
 
Back
Top