Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
Visual Basic Code | Excel Programming | |||
Visual Basic Code | Excel Programming | |||
visual basic code | Excel Programming | |||
Visual Basic query!!! | Excel Programming |