Loop thought contents

  • Thread starter Thread starter millwalll
  • Start date Start date
M

millwalll

Hi all,

I have excel sheet and want to loop thought it contents and show the value
of the contents on a form. This the code I have and it just wont work and I
cant see why any help be great thanks?

Dim intshowrow As Integer
intshowrow = 0

Do Until Data.Range("a2").Offset(intshowrow, 0).Value <> ""
intshowrow = intshowrow + 1
Loop


'This will take the data enterd in the form and add it to the data sheet.
Software_form.txtSoftware2.Value =
Data.Range("a2").Offset(intshowrow, 0)
Data.Range("a2").Offset(intshowrow, 0) =
Software_form.txtSoftware2.Value

It's Probley sumthing silly

Why I am here I will also need to have an update button and Delete button.
So when the user come's to data they want to update they can. And when they
dont need data any more can press delete and it will remove the whole row
what best way to do this ?

once again thanks

p.s I am pretty new to VBA
 
Which line fails?
Where do you have the code? in a General module, a worksheet module,
ThisWorkbook module?
Which Excel version are you using?


Dan
 
Well it jsut wont loop if i changed the code around it lopps but also removes
all information from spreadsheet

I have the code under a button so on click it will go thought the data. And
its in a form and I am using excel 2003
 

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