Creating an AutoNumber ID as a primary key

  • Thread starter Thread starter Stephan Leduc
  • Start date Start date
S

Stephan Leduc

I'm creating a user form where it will push data to an Excel spreadsheet. I
will later link this spreadsheet to MS Access to do some reports.

I need to create a function where for each new line added to a the
spreadsheet, I need to create a unique ID (the row name will be "ID") a
little bit like the AutoNumber in Access.

Thanks in advance for the help.
 
You are Fantastic Bob.

Thanks

Regards

Stephan

Bob Phillips said:
AutoId = Application.Max(Activesheet.Columns(1)) + 1

--
__________________________________
HTH

Bob
 

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

Back
Top