Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Visual basic code query

Ive coded various items of data and assigned values to each item such that
when I produce a total I want to lookup a particular cell and check for the
total in it and then run a specific program associated with that total.

For example, when the total in, say, cell A50 is 60 I want it to trigger
application A, if 61 then application B etc.

So how would I write a Visual Basic program to: check the value of this cell
containing my total (which may be, for example, between 60 and 120) and then
run the program I have associated with that number?

Many thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Visual basic code query

Try something like this:

Sub test()
Select Case Range("A50").Value
Case 60
Call Application_A
Case 61
Call Application_B
'etc. ...
Case Else
' ...
End Select
End Sub

Regards,
Stefi


€˛Zakynthos€¯ ezt Ć*rta:

Ive coded various items of data and assigned values to each item such that
when I produce a total I want to lookup a particular cell and check for the
total in it and then run a specific program associated with that total.

For example, when the total in, say, cell A50 is 60 I want it to trigger
application A, if 61 then application B etc.

So how would I write a Visual Basic program to: check the value of this cell
containing my total (which may be, for example, between 60 and 120) and then
run the program I have associated with that number?

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Visual basic code query

Stefi,

Many thanks for your help.

Best wishes,

Tony

"Zakynthos" wrote:

Ive coded various items of data and assigned values to each item such that
when I produce a total I want to lookup a particular cell and check for the
total in it and then run a specific program associated with that total.

For example, when the total in, say, cell A50 is 60 I want it to trigger
application A, if 61 then application B etc.

So how would I write a Visual Basic program to: check the value of this cell
containing my total (which may be, for example, between 60 and 120) and then
run the program I have associated with that number?

Many thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Visual basic code query

You are welcome! Thanks for the feedback!
Stefi


€˛Zakynthos€¯ ezt Ć*rta:

Stefi,

Many thanks for your help.

Best wishes,

Tony

"Zakynthos" wrote:

Ive coded various items of data and assigned values to each item such that
when I produce a total I want to lookup a particular cell and check for the
total in it and then run a specific program associated with that total.

For example, when the total in, say, cell A50 is 60 I want it to trigger
application A, if 61 then application B etc.

So how would I write a Visual Basic program to: check the value of this cell
containing my total (which may be, for example, between 60 and 120) and then
run the program I have associated with that number?

Many thanks

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
Visual Basic code Pickle Excel Discussion (Misc queries) 1 September 4th 08 03:35 PM
Visual Basic Code amirstal Excel Programming 1 December 8th 06 04:40 PM
Visual Basic Code amirstal Excel Programming 0 December 8th 06 05:00 AM
visual basic code Whitey Excel Programming 1 October 26th 04 04:05 PM
Visual Basic query!!! stedyeddyallsop Excel Programming 2 December 12th 03 11:23 AM


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