Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Easy Question

i need a program to run only if a value is met in a
certain cell...is that what this is all about?...or
something like this anyway...--

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Easy Question

Lawson,

Depends on when you want the program (macro?) to run:
on selection (Target = cell selected)
on cell change (Target = cell changed)
on calculation (no Target)
each has an event

just need
If Range(A1) = *value* then
Call MyMacro
End If

change A1 to your cell, set *value* to a varaiable, a reference, or a value.
Target can sometimes be used for Range(A1) if they are the same.

--
sb
"Lawson" wrote in message
...
i need a program to run only if a value is met in a
certain cell...is that what this is all about?...or
something like this anyway...--

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)

End Sub



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
REALLY easy question Thatgirl Excel Worksheet Functions 2 July 3rd 08 10:22 AM
Easy VBA question Dallman Ross Excel Discussion (Misc queries) 2 August 6th 07 01:26 AM
Easy Question M&M[_2_] Excel Discussion (Misc queries) 3 July 24th 07 12:34 AM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
easy question Dahlman Excel Worksheet Functions 3 April 1st 05 11:11 PM


All times are GMT +1. The time now is 04:49 AM.

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"