Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88030

I have 4 values obtained from a form, I would like to paste these values into a worksheet

$
0
0

I have these four values obtained from a userform.

With Worksheets("Sheet1)

Worksheets("Sheet1").Range("A2").value = TextBox1.Value
Worksheets("Sheet1").Range("B2").value = ListBox1.Value
Worksheets("Sheet1").Range("C2").value = TextBox2.Value
Worksheets("Sheet1").Range("D2").value = ListBoxw.Value

End with

But I want to paste in the next available row instead of just replacing the data in row 2. How can I make it dynamic like that? Do I need to count the number of items already there? So if the user opens the form again, the previously entered data is still there and we just add on. Also, how could I put the current date as the default value in TextBox1?


Viewing all articles
Browse latest Browse all 88030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>