I have some problems with this code below,
It's not doing what I expect
I want this code to active an add in to update my main sheet and then goes to the next sheet and update also using the same key combination until page 6,
What I get is that first goes to the page 6 and then performs the key combination 6 times
I appreciate if you can give me some advice of what I'm doing wrong,
It's not doing what I expect
I want this code to active an add in to update my main sheet and then goes to the next sheet and update also using the same key combination until page 6,
What I get is that first goes to the page 6 and then performs the key combination 6 times
I appreciate if you can give me some advice of what I'm doing wrong,
Code:
Sub UpdateandChange()
Dim i As Integer
Worksheets("FirstSheet").Activate
for i= 1 to 6
SendKeys "%XSR"
On Error Resume Next
Sheets(ActiveSheet.Index + 1).Activate
If Err.Number <> 0 Then Sheets(1).Activate
Next i
End Sub