Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Input Box Asking for Multiple Responses
Have the following code (which is called from another macro), which works
fine when I enter the ranges as noted; however, the ranges will change each time and each should be based as an offset to a certain cell, such as Range("AS9").End(xlDown).Offset(4, 2). However, when I try to use this reference instead of "AU90" for instance, it will ask me for my 1st input, then errors out at the 'Range(addr).Value = response' line with a 'Method Range of Object - Global failed' message. Have tried all the variations I can think of; can someone please advise what I'm doing wrong? Sub MainProcedure() LoadData "AU90", "Enter the term (in years) you assumed." LoadData "AV90", "Enter scope." LoadData "AW90", "Did you include price protect?" End Sub Sub LoadData(addr As String, msg As String) Dim response As Variant, iR As Integer While response = "" response = InputBox(prompt:=msg) If response = "" Then iR = MsgBox("You must enter a response; please try again.") End If Wend Range(addr).Value = response End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
lookup with multiple responses | Excel Discussion (Misc queries) | |||
How do I get multiple Vlookup responses? | Excel Worksheet Functions | |||
Multiple responses for a column | Excel Discussion (Misc queries) | |||
no responses... | Excel Discussion (Misc queries) | |||
Calculate multiple results from multiple input values? | Excel Discussion (Misc queries) |