Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default setting the focus using VB

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

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default setting the focus using VB

never mind i found what i was looking for :

range("XX"). select

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

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default setting the focus using VB

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

"Yan Robidoux " skrev i
melding ...
hello to you all...

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

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

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

yan


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default setting the focus using VB

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...

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default setting the focus using VB

"Yan Robidoux " skrev i
melding ...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the focus Orf Bartrop New Users to Excel 4 August 9th 06 05:36 AM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
VBA Setting .Value to a date does not respect local system setting Frank_Hamersley Excel Programming 13 July 18th 04 02:51 PM
Sending email via macro- setting the importance setting. Julian Milano[_2_] Excel Programming 1 January 20th 04 10:15 PM
Setting form controls focus and enter key John T Ingato Excel Programming 1 October 6th 03 05:13 PM


All times are GMT +1. The time now is 10:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"