Yes, in the VBE you have the code editor. If it is for this workbook, select This Workbook in the project explorer Ctrl+R. Then you can see at the top you have General, select Workbook in the drop down and from there you can select (on the right side, declarations) the open(When opening a workbook) or activate(when activating a workbook).
Or just copy the code below 
But keep in mind that the macro's have to be enabled
Private Sub Workbook_Open()
'Your code here
End Sub
Private Sub Workbook_Activate()
'Your code here
End Sub
Bookmarks