ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Loop thought contents (https://www.excelbanter.com/excel-programming/408350-loop-thought-contents.html)

millwalll

Loop thought contents
 
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

dan dungan

Loop thought contents
 
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

millwalll

Loop thought contents
 
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

"dan dungan" wrote:

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



All times are GMT +1. The time now is 08:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com