Q1:
- In the Visual Basic Editor in the project window there's an object entitled "ThisWorkbook". If you double click this a script window appears. At the top of the page are two drop down boxes (mine say by default "(General)" and "(Declarations)").
- Expand the left hand box and click 'Workbook' a private sub will appear, ignore it and/or delete it later.
- Expand the right hand box. In this there a lots of event. Many useful ones. The one you want is the 'open' event. Click this and another sub will appear:
Private Sub Workbook_Open()
End Sub
Q3:
Probably similar to above but use the 'SheetCalculate' or 'SheetChange' event, then right a macro. Something like:
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)If cells(x,y).value > 0 Then
Cells(x,y).select
Selection.copy
Workbooks.open("workbookname")
windows("workbookname").Activate
Cells(x1,y1).select
ActiveSheet.Paste
End If
End Sub
Bookmarks