Form limitation

  • Thread starter Thread starter rsustudent
  • Start date Start date
R

rsustudent

in excel, i've written a macro so that I can select ranges of fields
and increase the value in each cell by a set amount that I specify.
The problem, is that I want to select many sets of ranges. I can selec
somewhere around 15 or so, but past that if I try to hold control an
select another set, it unselects all the others, and acts kinda funny.
Is there something I could do to allow me to select more ranges?
here's my macro code:

Sub addit()
Dim myvar As Variant
Dim myrange As Range

myvar = Application.InputBox("Enter A value to add", Type:=3)
Set myrange = Application.InputBox("Select a Range to add it to"
Type:=8)

For Each cell In myrange.Cells
If Len(cell.Value) = 0 Then
cell.Value = cell.Value
ElseIf IsNumeric(cell.Value) = True Then _
cell.Value = cell.Value + myvar
End If
Next cell

End Su
 
That is probably because the the string of addresses returned exceeds 255
characters. If you need to select more than around 15, you will have to do
it in separate steps.
 
So there's no workaround? damn.
Guess I'd better get to work then.
Yuck.
-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Make Macro Work On A Different PC 5
Code not working 3
Compile Error 5
Combining Procedures into Loop 3
Object range failed 1
For Next loop 2
hyperlink creation problem 1
Save Array in memory 5

Back
Top