Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How Macro Ask for Variable Input?
Have the following macro code I run on a spreadsheet. Would like the macro
to prompt the user for a variable input where I have "<8" below. Can this be done? Cells.Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=NOW()-$P1<8" With Selection.FormatConditions(1).Interior .ColorIndex = 37 .Pattern = xlSolid End With |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How Macro Ask for Variable Input?
You've got one reply to your other post.
Al Franz wrote: Have the following macro code I run on a spreadsheet. Would like the macro to prompt the user for a variable input where I have "<8" below. Can this be done? Cells.Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=NOW()-$P1<8" With Selection.FormatConditions(1).Interior .ColorIndex = 37 .Pattern = xlSolid End With -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How Macro Ask for Variable Input?
Something like
With Cells .FormatConditions.Delete ans = Inputbox("Supply limit (1-10)" .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=NOW()-$P1<" & ans With .FormatConditions(1).Interior .ColorIndex = 37 .Pattern = xlSolid End With End With -- HTH Bob Phillips "Al Franz" wrote in message ... Have the following macro code I run on a spreadsheet. Would like the macro to prompt the user for a variable input where I have "<8" below. Can this be done? Cells.Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=NOW()-$P1<8" With Selection.FormatConditions(1).Interior .ColorIndex = 37 .Pattern = xlSolid End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Variable sum from defined input | Excel Worksheet Functions | |||
PAUSE EXCEL MACRO FOR INPUT OF DATA VARIABLE | Excel Discussion (Misc queries) | |||
With QUERY how to input a variable | Excel Discussion (Misc queries) | |||
variable/Input box problem | Excel Programming | |||
Input box with variable | Excel Programming |