Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Input programming decision time ??

Hi;

I have just completed an UserForm with 45 input fields which get
manipulated, concatenated and optioned down to 25 items of data. The 25
items will be inserted into 25 different worksheet database columns. The
worksheet columns are not consequitive and are random with regards to the
Userform input. I can think of two strategies for getting the data from the
UserForm to the Worksheet.

1) On entering the data, after manipulation, the item is stored in a 2D
ReDim-able array, Array(25, 0). As more members are added the Array is
ReDim-ed for each new member. On clicking Save, the required number of rows
is added to the database and the program loops through the array inserting
the data items into the appropriate column. This has an extra step by using
the intermediary array but has the advantage of not inserting rows until the
end of the process and makes undoing easier. On the other hand,...

2) Simply inserting a new row as each member entry is initiated and drectly
transfering the data from the UserForm input field to the appropriate
worksheet column as it is entered seems a bit simpler - but not a lot.

Becasue of the scattering of the worksheet columns in relation to the input
order, the only solution I can think of is using a Select:Case for 25
different Array indicies. This seems excessive to me -- but I am not
experienced enough to know for sure.

What is my best strategy for transfering my data from the Userform to the
worksheet? And, is there a better way to match Array index to worksheet
column than using Select?

Regards Bill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Input programming decision time ??

Bill, if you name your worksheet columns and give your userform
controls the same name, it should simplify things. For instance, the
contents of txtCity would go into column City. Or you could just name
the first cell in each column and then use an offset to enter each new
row, again referring to the column that contains each name. Something
to mull over. James
Bill Case wrote:
Hi;

I have just completed an UserForm with 45 input fields which get
manipulated, concatenated and optioned down to 25 items of data. The 25
items will be inserted into 25 different worksheet database columns. The
worksheet columns are not consequitive and are random with regards to the
Userform input. I can think of two strategies for getting the data from the
UserForm to the Worksheet.

1) On entering the data, after manipulation, the item is stored in a 2D
ReDim-able array, Array(25, 0). As more members are added the Array is
ReDim-ed for each new member. On clicking Save, the required number of rows
is added to the database and the program loops through the array inserting
the data items into the appropriate column. This has an extra step by using
the intermediary array but has the advantage of not inserting rows until the
end of the process and makes undoing easier. On the other hand,...

2) Simply inserting a new row as each member entry is initiated and drectly
transfering the data from the UserForm input field to the appropriate
worksheet column as it is entered seems a bit simpler - but not a lot.

Becasue of the scattering of the worksheet columns in relation to the input
order, the only solution I can think of is using a Select:Case for 25
different Array indicies. This seems excessive to me -- but I am not
experienced enough to know for sure.

What is my best strategy for transfering my data from the Userform to the
worksheet? And, is there a better way to match Array index to worksheet
column than using Select?

Regards Bill


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
Decision Matrix with multiple criteria and decision Majja Charts and Charting in Excel 0 February 22nd 08 07:12 PM
programming input box Nicole Seibert Excel Programming 5 May 8th 06 08:30 PM
can you input time (hh:mm:ss) without having to input the colon i. Lexicon Excel Discussion (Misc queries) 4 January 11th 05 02:09 PM
Programming using military time Mike Excel Programming 6 December 31st 04 10:27 AM
Date & Time programming cj Excel Programming 1 September 9th 04 08:23 PM


All times are GMT +1. The time now is 04:17 PM.

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

About Us

"It's about Microsoft Excel"