LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default worksheet-change event in combination with a select case statement

Hi Abdul,

Do you know how to use each separately? I mean, do you know how to setup a
worksheet-change event that trigger by change in a particular cell?

Private Sub Worksheet_change(ByVal Target As Range)
Dim ws As WorkSheet
Set ws = ActiveSheet
If (Target.Row = 5 And Target.Column = 5) Then
' Code to do thing here if the Cell "E5" changes
' This is where you would put the Select Case statement to decide what to
format or whatever you want Excel to do.
End If
End Sub

Part 2 of the question is the Select Case statement. You don't have to use
Select-case statement if you not familiar with it, just use nested If Else
statements.

Hong Quach

"Abdul" wrote:

I've heard that combining "Worksheet-change event", along with "Select Case
Statement" can be used to change format of cells the same way as "Conditional
Formatting" is used, but I don't know how does one use those 2. I appreciate
examples.

 
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
Select Case Statement Katie Excel Worksheet Functions 13 December 1st 08 07:32 PM
Using Like Statement in Select Case J@Y Excel Programming 2 July 25th 07 05:30 PM
For...Next or Select Case Statement VBA_Newbie79[_2_] Excel Programming 3 July 2nd 07 08:44 PM
select case statement? CR[_2_] Excel Programming 5 December 20th 06 09:21 PM
select case statement jrd269[_4_] Excel Programming 4 June 3rd 05 04:22 PM


All times are GMT +1. The time now is 05:07 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"