Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA question involving an InputBox
I was wondering if anyone knew the syntax for this:
I have a worksheet macro that senses when a cell value is "FAIL". It then prompts the user with an input box, and sends that result to another cell at the end of that row. I'm having trouble with writing the result of the input box to another cell. Can this be done with ranges...? I've yet to get the syntax right. Here's what I have so far: Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Not Application.Intersect(Target, Range("K2:S212")) Is Nothing Then If Target.Value = "FAIL" Then Dim varUserInput As Variant varUserInput = InputBox("Enter comments: ", _ "Comment Field", "") If varUserInput < "" Then 'here's where I need to write varUserInput to a cell at ' the end of the current row End If End If End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A question involving attaching formulas | New Users to Excel | |||
A question involving attaching formulas | New Users to Excel | |||
A question involving attaching formulas | New Users to Excel | |||
VBA question involving an InputBox | Excel Programming | |||
VBA question involving numerous additions | Excel Programming |