Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Using Worksheet_Change(ByVal Target As Range)

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Using Worksheet_Change(ByVal Target As Range)

Hi Les,

I'll be interested in seeing a better method if someone has one but this
works:-

'Only runs with Target in range B6:C8

If Target.Row = 6 And Target.Row <= 8 _
And Target.Column = 2 And Target.Column <= 3 Then
Sheets("Sheet2").Activate
End If

Regards,

OssieMac

"Les G" wrote:

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les

  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Using Worksheet_Change(ByVal Target As Range)

Perhaps something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Sheet3.Activate
End If
End Sub



"Les G" wrote:

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Using Worksheet_Change(ByVal Target As Range)

You are a star... I made a slight modification and it worked a dream...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
Sheet3.Activate
End If
End Sub

Thanks very much

"JMB" wrote:

Perhaps something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Sheet3.Activate
End If
End Sub



"Les G" wrote:

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les

  #5   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Using Worksheet_Change(ByVal Target As Range)

you're welcome, thanks for posting back

"Les G" wrote:

You are a star... I made a slight modification and it worked a dream...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
Sheet3.Activate
End If
End Sub

Thanks very much

"JMB" wrote:

Perhaps something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Sheet3.Activate
End If
End Sub



"Les G" wrote:

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Using Worksheet_Change(ByVal Target As Range)

Thank you from a wonderful day in sunny South Africa

"JMB" wrote:

you're welcome, thanks for posting back

"Les G" wrote:

You are a star... I made a slight modification and it worked a dream...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
Sheet3.Activate
End If
End Sub

Thanks very much

"JMB" wrote:

Perhaps something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Sheet3.Activate
End If
End Sub



"Les G" wrote:

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les

  #7   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Using Worksheet_Change(ByVal Target As Range)

You're welcome from an overcast, dreary day in Illinois (U.S.)

"Les G" wrote:

Thank you from a wonderful day in sunny South Africa

"JMB" wrote:

you're welcome, thanks for posting back

"Les G" wrote:

You are a star... I made a slight modification and it worked a dream...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
Sheet3.Activate
End If
End Sub

Thanks very much

"JMB" wrote:

Perhaps something like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Sheet3.Activate
End If
End Sub



"Les G" wrote:

I would like to change the focus from the current worksheet to another when a
value in a specific range is changed. This is an easy VB statement but I am
going round in circles... Please Help

Thanks

Les

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
REPSOT?? Sub Worksheet_Change(ByVal Target As Range) Ed Davis[_2_] Excel Discussion (Misc queries) 14 October 13th 09 03:20 PM
Private Sub Worksheet_Change(ByVal Target As Range) Paige Excel Programming 1 May 17th 07 12:16 AM
Private Sub Worksheet_Change(ByVal Target As Range) pd1234321 Excel Programming 5 December 8th 06 04:11 AM
Private Sub Worksheet_Change(ByVal Target As Range) Arturo Excel Programming 1 May 25th 05 03:32 PM
Many Sub Worksheet_Change(ByVal Target As Range) In One Worksheet MathewPBennett Excel Programming 4 December 24th 03 01:01 PM


All times are GMT +1. The time now is 03:29 AM.

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"