stephen_wee
May 28th, 2003, 10:20 PM
Hi All,
The following is opening a particular xls file
Sub chartsheet_onclick()
call OpenWorkbook("d:/My Documents/XYZ.xls")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
objExcel.Sheets("sheet1").Visible = True
End Sub
So how do U open a word document e.g. XYZ.doc ?
The following is opening a particular xls file
Sub chartsheet_onclick()
call OpenWorkbook("d:/My Documents/XYZ.xls")
End Sub
Sub OpenWorkbook(strLocation)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = true
objExcel.Workbooks.Open strLocation
objExcel.UserControl = true
objExcel.Sheets("sheet1").Visible = True
End Sub
So how do U open a word document e.g. XYZ.doc ?