Reading values from inputbox into arrays
1. read the list into a string
2. parse the string into an array
Sub nayab()
Dim s As String
s = Application.InputBox(prompt:="Enter list: ", Type:=2)
listt = Split(s, ",")
For i = 0 To UBound(listt)
MsgBox (listt(i))
Next
End Sub
--
Gary''s Student - gsnu2007k
"Nayab" wrote:
Is it possible to read the values from inputbox directly into arrays?
The values may be comma-separated or space-separated.
The initial problem is I want to exclude certain sheets from
processing based on user's input. So I display the msg showing all the
sheet names to the user and if the user chooses to exclude some of the
sheets, I plan to ask for the sheet names to be excluded which I plan
to put in an array and use the array for further processing.
Thanks
|