View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
moon[_5_] moon[_5_] is offline
external usenet poster
 
Posts: 40
Default UserForm Data to Worksheet



For your rows and columns, you can declare integer variables:

Dim r, c As Integer
r = 1
c = 1
Cells( r, c ).Select 'Row 1, Column 1 -- A1
<Enter your value now

r = r + 1 'Next Row
Cells( r, c ).Select
<Enter your next value now

And if you want to move a column to the right:
c = c + 1
Cells( r, c ).Select

It's the best to code this way of moving to the next column or row in a
Loop.

For c = 1 To 5
Cells( r, c ).Select
<Enter data
Next c




"maximillan via OfficeKB.com" <u25565@uwe schreef in bericht
news:652194e3b3fd9@uwe...
Cool tips. So far I've been able to transfer data from UserForm to the
worksheet. What I haven't figured out is how it would move to the next
line.
Somehow, it just replaces the existing data on the same row. Can anyone
shed
light on this? Thanks again! You guys are great!

--
Message posted via http://www.officekb.com