LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Array problems

Thanks JL - nearly there although I can't quite get this to work. It would
seem the ibox variable isn't carrying the value entered by the user. It just
inputs 1 - 28 (on each loop) and the ibox is empty. When I put the .value to
the ibox it comes up with an 'expected: end of statement' message. I tried
declaring each of the iboxes (ibox1, ibox2) etc in the 'Declarations' part
but to no avail (another error message).

"JLGWhiz" wrote:

Should be: For i = 1 to 28
Sheet19.Cells(i + 4, c) = Sheet19.Cells(i + 4, c) +
(ibox & i).Value
next i


"JLGWhiz" wrote:

First of all, I am assuming you made a typo with:

Sheet19.Cells(5, c) = Sheet19.Cells(5, c) + ibox1.Value
Sheet19.Cells(6, c) = Sheet19.Cells(5, c) + ibox2.Value

and the second line should have been

Sheet19.Cells(6, c) = Sheet19.Cells(6, c) + ibox2.Value

If so, this should work:

For i = 1 to 28
Sheet19.Cells(i + 4, c) = Sheet19.Cells(i + 4, c) + ibox (i).Value
next i


"KneeDown2Up" wrote:

I have a number of text boxes (ibox1 - ibox28) all holding data inputed via a
userform. To capture this data I potentially (with my knowledge) need this;


Sheet19.Cells(5, c) = Sheet19.Cells(5, c) + ibox1.Value
Sheet19.Cells(6, c) = Sheet19.Cells(5, c) + ibox2.Value
..and so on.

I would like to be able to run this within a 'For/Next' loop but keep coming
up against problems.

For i = 1 to 28
Sheet19.Cells(5, c) = Sheet19.Cells(5, c) + ibox(i).Value
next i

Why is this? What can I do to make this principle work?

Any help appreciated, thanks.

 
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
Array problems Bruce D. Excel Discussion (Misc queries) 4 September 28th 06 09:36 PM
Macro with Array Function Problems Brett Excel Worksheet Functions 5 January 10th 06 09:50 PM
Problems with Array systemx[_2_] Excel Programming 1 December 20th 05 01:42 PM
Problems Converting 1-D Array to 2-D Array ExcelMonkey[_190_] Excel Programming 1 March 28th 05 12:16 AM
Problems populating an array John N. Excel Programming 1 July 22nd 04 10:31 PM


All times are GMT +1. The time now is 11:38 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"