userform to enter data - needs to goto next blank cell

D

deanimate

Hi :)
Ok the way i am doing this currently is, to be blunt, rubbish.

Thus i am hoping someone could help me out here.

Basically i click on a button that loads up a userform and in it are
ten boxes where i enter numerical data. When i click ok this data
automatically gets put into some cells on a specified sheet.

All im after is before the data is put down onto sheet some kind of
search is carried out to find the next blank cell in each of the ten
rows where the data is going to go.

Example:
So i may have Row4 with data starting from B going upto G. I load up
the userform and after the data is entered i click ok and like magic
its put straight into row H.

Many thanks if anyone has any ideas!
 
B

Bob Phillips

This code will get the first blank column in row 4, extend for the others

cNextFree =
Worksheets("Sheet1").Cells(4,Columns.Count).End(xlToLeft).Column + 1

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

deanimate

Thanks Bob :)
is working a treat so far!
will post if there's any probs but so far so good :]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top