I am trying to come up with a solution in VBA, what I want to do is to active each tab in this file and active certain cell for each tab based on different requirement. However my code didn't work, for the statement:
wkbk1.ws.Activate
It said Object doesn't not support this property or method(not sure why, my ws is the worksheet right?)
My code is:
For Each ws In wkbk1.Worksheets
wkbk1.ws.Activate ' error here
If wkbk1.ws.Name = "Page" Then
wkbk1.ws.Range("B2").Select
ElseIf wkbk1.ws.Name = "Contents" Or "Results" Then
wkbk1.ws.Range("B1").Select
ElseIf wkbk1.ws.Name = "Logic" Then
wkbk1.ws.Range("C1").Select
Else
wkbk1.ws.Range("A1").Select
End If
Next
Can anyone please give me an idea for why I am having this issue?