program next column
I use this kind of thing:
Dim NextCell as range
with worksheets("somesheetnamehere")
set Nextcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
end with
with nextcell
.value = "stuff in column A"
.offset(0,1).value = "stuff in B"
.offset(0,2).value = "stuff in C"
end with
=====
Sometimes, I use:
Dim NextRow as long
with worksheets("somesheetnamehere")
NextRow = .cells(.rows.count,"A").end(xlup).row + 1
.cells(nextrow,"A").value = "a"
.cells(nextrow,"B").value = "B"
.cells(nextrow,"C").value = "C"
end with
ChuckS wrote:
Hello,
I have a couple of user forms including text boxes that I would like to use
to complete cells in a spreadsheet. I need to look for the next empty cell to
start the data in column a. I have this code working fine but is there a
simple way to increment the c.address by one column marker to shift from a to
b, b to c and so on.
--
Dave Peterson
|