Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
How can I loop through excel rows by clicking a button. I want to populate a new row in excel every time I click this button. For eg: I Click a button "Insert" , on clicking this button I want to insert data in next empty row. Once user inputs data on Sheet1 and clicks insert, it inserts the data in sheet2 and clears the data in sheet1, Now user can again input data in sheet1 and clicking insert will insert data in row 2 of sheet2 (Basically next available row). Is there a way to loop it like this? and keep updating the sheet with data in next row? Here is the part of code for looping through new rows. But it doesnt work as I want it to. Dim r as long Set wst = Worksheets("sheet1") With wst ..Range("A1").Value = Me.City.Value End With r = r + 1 FName = "C:\My Documents\" _ & "Address" & ".xls" wst.SaveAs FileName:=FName Hope I made it clear. Thanks in Advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Inserting a picture object and double-clicking on it opens photo e | Excel Discussion (Misc queries) | |||
Passing parameters from clicking a button | Excel Programming | |||
Get info on toolbar button by clicking on it | Excel Programming | |||
Store data JUST entered in Activecell after clicking command button on worksheet | Excel Programming |