Chewyhairball
Active Member
- Joined
- Nov 30, 2017
- Messages
- 312
- Office Version
- 365
- Platform
- Windows
Hi
I have this code that when run, either adds or removes a specific number of rows from table1 depending on cell value in A14
I am looking for way to show (as the code is running) a countdown(or countup) of how many rows are left to go.
It can be a cell on the sheet or a shape linked to a cell or pretty much anything like that.
It sometimes takes a while if a few rows are added and thought it might be better to show the progress.
The middle part of the code just shows a box with a statement about rows currently being added.
thanks
Rory
I have this code that when run, either adds or removes a specific number of rows from table1 depending on cell value in A14
I am looking for way to show (as the code is running) a countdown(or countup) of how many rows are left to go.
It can be a cell on the sheet or a shape linked to a cell or pretty much anything like that.
It sometimes takes a while if a few rows are added and thought it might be better to show the progress.
The middle part of the code just shows a box with a statement about rows currently being added.
thanks
Rory
VBA Code:
Dim i As Integer
If Range("A14").Value > 0 Then
For i = 1 To Range("A15").Value
Application.ScreenUpdating = True
ActiveSheet.Shapes("Rectangle: Rounded Corners 1").Visible = True
Application.ScreenUpdating = False
ActiveSheet.ListObjects("Table1").ListRows.Add
Range("A20").Select
ActiveSheet.Unprotect
Selection.Insert Shift:=xlDown
Next i