Workbook Open Event Procedure

  • Thread starter Thread starter Vijay Chary
  • Start date Start date
V

Vijay Chary

Hi !! :)
Could someone tell me if it is possible to work with another
workbook from a workbook open event procedure !

Thank you !! :)
 
The Workbook_Open() event procedure will only fire from the workbook the
procedure is in. However, you can put code in that procedure that will
return values from another workbook, execute code in another workbook, etc.

Private Sub Workbook_Open()
Set wb2 = Workbooks.Open("C:\MyDocuments\myFile.xls")
wb2.Sheets(1).Range("A1") = "Hello There"
MsgBox wb2.Sheets(1).Range(A1").Value
End Sub
 
Back
Top