Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User input as a range
Hello,
I need to get user input for a range of data and then assign this range to array. Anyone got any pointers.. Thanks S |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User input as a range
Sub Tester9()
Dim varr As Variant Dim rng As Range On Error Resume Next Set rng = Application.InputBox("select range with mouse", Type:=8) On Error GoTo 0 If rng Is Nothing Then Exit Sub varr = rng.Value For i = 1 To UBound(varr, 1) For j = 1 To UBound(varr, 2) Debug.Print "Varr(" & i & ", " & j & ") = " & varr(i, j) Next Next End Sub -- Regards, Tom Ogilvy "Shane" wrote in message ... Hello, I need to get user input for a range of data and then assign this range to array. Anyone got any pointers.. Thanks S |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
User input as a range
there are 2 inputbox method's.
VBA's Inputbox or VBA.inputbox and Excel's Application.Inputbox The latter boasts a refedit.. when Type =8 dim rng as range on error resume next set rng = Application.Inputbox("Select a Range..",type:=8) on error goto 0 if rng is nothing then exit sub 'cancelled else msgbox rng.address endif keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Shane" wrote: Hello, I need to get user input for a range of data and then assign this range to array. Anyone got any pointers.. Thanks S |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prompt user for input and utilize that input | Excel Worksheet Functions | |||
Trying to select a specific range based on the time value of user form input | New Users to Excel | |||
Have user input converted to uppercase in same cell as input? | New Users to Excel | |||
user input decides cell copy range | Excel Discussion (Misc queries) | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |