You can refer to any sheet - either by name or by index. Look at the
WorkSheets and sheets collections (I think they both do the same thing).
E.g.
Option Explicit
Private Sub CommandButton1_Click()
Worksheets(1).Range("a1").Value = 1
Worksheets(2).Range("a1").Value = 2
Sheets(1).Range("a2").Value = 1
Sheets(2).Range("a2").Value = 2
Sheets("Sheet1").Range("a3").Value = 1
Sheets("Sheet2").Range("a3").Value = 2
End Sub