Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA script question
I need a short VBA script that will check a specific cell on a worksheet for
the day of the week (from a drop-down menu) and then run the required macro (one for each day of the week). Any ideas Thanks -- Howard |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA script question
hi
this should get you going. i didn't put all the days in the macro but you can add what days you require. also you may need to adjust the taget cell. Sub selectthecase() Dim r As Range Set r = Range("A1") If IsEmpty(r) Then 'in case cell is empty MsgBox "need imput" Exit Sub End If Select Case r Case Is = "Monday" Call mondaymacro Case Is = "Tuesday" Call Tuesdaymacro Case Is = "wednesday" Call Wednesdaymacro Case Else MsgBox "on your own here?" End Select End Sub regards FSt1 "Howard" wrote: I need a short VBA script that will check a specific cell on a worksheet for the day of the week (from a drop-down menu) and then run the required macro (one for each day of the week). Any ideas Thanks -- Howard |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA script question
FSt1
Thanks for the quick reply. This should do nicely. I'll give it a try. Howard -- Howard "FSt1" wrote: hi this should get you going. i didn't put all the days in the macro but you can add what days you require. also you may need to adjust the taget cell. Sub selectthecase() Dim r As Range Set r = Range("A1") If IsEmpty(r) Then 'in case cell is empty MsgBox "need imput" Exit Sub End If Select Case r Case Is = "Monday" Call mondaymacro Case Is = "Tuesday" Call Tuesdaymacro Case Is = "wednesday" Call Wednesdaymacro Case Else MsgBox "on your own here?" End Select End Sub regards FSt1 "Howard" wrote: I need a short VBA script that will check a specific cell on a worksheet for the day of the week (from a drop-down menu) and then run the required macro (one for each day of the week). Any ideas Thanks -- Howard |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA script question
I tried this and it isn't working. If I manually run the sub, it works, but
I need it to run any time that the text in the "r" cell is changed. Any ideas? Thanks for all the help -- Howard "FSt1" wrote: hi this should get you going. i didn't put all the days in the macro but you can add what days you require. also you may need to adjust the taget cell. Sub selectthecase() Dim r As Range Set r = Range("A1") If IsEmpty(r) Then 'in case cell is empty MsgBox "need imput" Exit Sub End If Select Case r Case Is = "Monday" Call mondaymacro Case Is = "Tuesday" Call Tuesdaymacro Case Is = "wednesday" Call Wednesdaymacro Case Else MsgBox "on your own here?" End Select End Sub regards FSt1 "Howard" wrote: I need a short VBA script that will check a specific cell on a worksheet for the day of the week (from a drop-down menu) and then run the required macro (one for each day of the week). Any ideas Thanks -- Howard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofill script question | Excel Discussion (Misc queries) | |||
VB Script for Excel Revised Question | Excel Programming | |||
VB Script for Excel Revised Question | Excel Programming | |||
Script question | Excel Programming | |||
excel script question -- numbers to words | Excel Programming |