Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Target Address/Value Macro Won't Work

I have a merged cell (C90:F90) to be used for text entry. It has a drop-down
for the user to select a response. If the user selects "via another method",
it should unhide row 91; if they select anything else, or delete an entry
already in there (that they inputted earlier perhaps), then row 91 should be
hidden. When I use the following code, it works except for when a current
entry is deleted - then I get a type mismatch error. Can someone please
advise what I've done wrong here?

If Not Intersect(Target, Range("C" & 90 & ":F" & 90)) Is Nothing Then
If Target.Value < "via another method" Then
Rows("91").Hidden = True
Else
Rows("91").Hidden = False
End If
End If

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Target Address/Value Macro Won't Work

If Not Intersect(Target, Range("C90:F90")) Is Nothing Then
If Target(1).Value = "via another method" Then
Rows("91").Hidden = False
Else
Rows("91").Hidden = True
End If
End If

--
Regards,
Tom Ogilvy



"Paige" wrote in message
...
I have a merged cell (C90:F90) to be used for text entry. It has a

drop-down
for the user to select a response. If the user selects "via another

method",
it should unhide row 91; if they select anything else, or delete an entry
already in there (that they inputted earlier perhaps), then row 91 should

be
hidden. When I use the following code, it works except for when a current
entry is deleted - then I get a type mismatch error. Can someone please
advise what I've done wrong here?

If Not Intersect(Target, Range("C" & 90 & ":F" & 90)) Is Nothing Then
If Target.Value < "via another method" Then
Rows("91").Hidden = True
Else
Rows("91").Hidden = False
End If
End If



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Target Address/Value Macro Won't Work

Thanks, Tom - works like a charm - you are a peach!!!

"Tom Ogilvy" wrote:

If Not Intersect(Target, Range("C90:F90")) Is Nothing Then
If Target(1).Value = "via another method" Then
Rows("91").Hidden = False
Else
Rows("91").Hidden = True
End If
End If

--
Regards,
Tom Ogilvy



"Paige" wrote in message
...
I have a merged cell (C90:F90) to be used for text entry. It has a

drop-down
for the user to select a response. If the user selects "via another

method",
it should unhide row 91; if they select anything else, or delete an entry
already in there (that they inputted earlier perhaps), then row 91 should

be
hidden. When I use the following code, it works except for when a current
entry is deleted - then I get a type mismatch error. Can someone please
advise what I've done wrong here?

If Not Intersect(Target, Range("C" & 90 & ":F" & 90)) Is Nothing Then
If Target.Value < "via another method" Then
Rows("91").Hidden = True
Else
Rows("91").Hidden = False
End If
End If




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
Can you use a Range $N$xx:$Q$xx in Target.Address? CRayF Excel Programming 7 December 14th 06 09:11 PM
Using Target.Address in Excel 98 Noemi Excel Discussion (Misc queries) 2 November 7th 05 01:36 PM
Target.Address Doesn't Work in Excel 97? JK Excel Programming 3 September 27th 05 04:15 AM
Target.Address syntax Coolboy55 Excel Worksheet Functions 3 August 23rd 05 12:23 AM
target address Mark Kubicki Excel Programming 2 October 31st 03 04:19 PM


All times are GMT +1. The time now is 02:53 PM.

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

About Us

"It's about Microsoft Excel"