Hello Prakash,
Enter this code by opening VBA, right click on This Workbook. In the window that opens, in the top left drop down select Workbook. This will create the Private Sub/End Sub part. Put in the rest and adjust the strings and any code that you require in the commented parts of the if statements.
Option Explicit
Private Sub Workbook_Open()
Dim iRet As Integer
iRet = MsgBox("Welcome", vbOKCancel, "MyExcelSpreadsheet")
If iRet = vbNo Then
'do one thing
Else
'do another thing
End If
End Sub
You have to save and re-open the spreadsheet for the macro to run.
Regards
Harry