Hi,
Need help regarding a command button auto click that automatically stop after specific period. Tried using suggestion i've read in one of the forum here to add "Call CommandButton1_Click" but i've notice that it wont stop that i have to turn my laptop off. I don't have knowledge in VBA that is why i'm just copying some code that work for my project. Below is the actual code (without Call CommandButton1_Click) that i use and i have to click it many times depending how many router to be add.
Code
Private Sub CommandButton1_Click()
Dim PV
PV = Range("A1").Value
Range("A1").Value = PV + 1
Dim MyRg As Range
Dim TextCell As Range
Dim TxtToWrite As String
Dim MyTxtFile
Set MyRg = Range("a5:a272")
For Each TextCell In MyRg
TxtToWrite = TxtToWrite & TextCell.Text & vbCrLf
Next
Open "C:\Users" & Environ("Username") & "\AppData\Roaming\VanDyke\Config\Sessions" & Range("a3") & ".ini" For Output As #1
Print #1, TxtToWrite
Close #1
MyTxtFile = Shell("C:\WINDOWS\notepad.exe C:\Users" & Environ("Username") & "\AppData\Roaming\VanDyke\Config\Sessions" & Range("a3") & ".ini", 1)
Call CommandButton1_Click
End Sub
Display More
regards
Joepox