Extract last cell value into vb userforms textbox

I've managed to get my vb in SW to open an excel spreadsheet and create the next sequential number in a column.

The question is, how do I extract the new number that has been created in the spreadsheet and insert it into TextBox1?

Cheers,

Stevie.

SolidworksApi macros
Answers 2
MM
MM 2014-01-23 Best Answer

If you can obtain the range object of the cell your number is in, set a string variable to the "text" property and then pass it back to your form.

SS
SS 2014-02-03

I managed to set it up where a cell (on another part of the spreadsheet identies the last cell) that cell then populates the userform. It was much easier and seems to work pretty well.