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: 2,276
Default Userform multiple colums and rows

Hi,
You cannot add another comment in column 4 you will need another column with
the statement as follow

ws.Cells(iRow, 5).Value = Me.Othercomment.Value

"Gaylen" wrote:

Hi my second part of the statement look as follows
ws.Cells(iRow, 1).Value = Me.txtIDkey.Value
ws.Cells(iRow, 2).Value = Me.txtDate.Value
ws.Cells(iRow, 3).Value = Me.cboRegnr.Value
ws.Cells(iRow, 4).Value = Me.txtComment.Value

What i want to do and having problem is, to add a next comment also in
column 4 but a new row. this is the formula i want to add, but statement
cause the previous one to be overwritten. I've also discover that the key is
in the <iRow definition.

ws.Cells(iRow, 4).Value = Me.txtComment2.Value

Which brings me back to this statement

iRow = Worksheets(€śsheet1€ť).Cells(Rows.Count, 1) _ .End(xlUp).Offset(1,
0).Row

"Eduardo" wrote:

Hi,
that is not all your code for sure you have something like this
.Cells(iRow, 4).Value = Me.TxtProjectname.Value

Check that for the second comment you are pointing to a different column, in
my case column D (4)

"Gaylen" wrote:

Hi, Im new to VBA programming, Ive learned a bit from Debra web page to
create a user form and am using the following statement to find first empty
row in database.
iRow = Worksheets(€śsheet1€ť).Cells(Rows.Count, 1) _ .End(xlUp).Offset(1,
0).Row
It works fine when writing one row and 4 columns. Example
Form Date: ______
ID: ______
Key ______
Comment: ___________________________

A B C D
1 Date ID Key Comment
2 2009/12 2345 29 house 24
3 2009/14 2342 2 garage 7
Now what I like some help on is that to enter two rows and four columns from
one form.
Form Date: ______ (98/4)
ID: ______ (77)
Key ______ (200)
Comment: ___________________________ (house 54)
Comment2: __________________________ (bray, lama)
A B C D
1 Date ID Key Comment
2 2009/12 2345 29 house 24
3 2009/14 2342 2 garage 7
4 98/4 77 200 house 54
5 98/4 77 200 bray, lama

At present moment the second comment overwrite the first. Ive played with
code but clearly do not understand it fully to make it work right.

 
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
label to display multi rows and colums on a userform pswanie Excel Programming 0 January 4th 08 09:40 AM
lock multiple rows and colums ? Boswell Excel Discussion (Misc queries) 1 November 11th 06 02:29 AM
How do change rows to colums AND columns to rows Colleen A Excel Discussion (Misc queries) 7 December 30th 05 12:40 AM
Print few rows with many colums so that rows wrap on printed pages usfgradstudent31 Excel Discussion (Misc queries) 1 October 20th 05 02:39 PM
How do I name the colums and rows? Cin3 New Users to Excel 5 January 5th 05 11:09 PM


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