Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Form limitation

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

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Form limitation

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.

--
Regards,
Tom Ogilvy

"rsustudent " wrote in message
...
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 select
somewhere around 15 or so, but past that if I try to hold control and
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 Sub


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Form limitation

So there's no workaround? damn.
Guess I'd better get to work then.
Yuck.
-

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Limitation Atom Smasher Excel Discussion (Misc queries) 4 July 17th 06 07:59 PM
Way around row limitation mrwawa Excel Discussion (Misc queries) 4 June 29th 06 08:46 PM
Excel Limitation Ian Excel Discussion (Misc queries) 2 February 10th 06 07:43 PM
Excel Limitation Farhan Excel Worksheet Functions 1 February 11th 05 08:33 AM
Limitation Jase Excel Programming 1 December 3rd 03 12:35 AM


All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"