Storage of excel file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I've customized a form and see a code as below
Sub cmdWorksheet_Click

Set objExcelApp = Item.Application.CreateObject("Excel.Application")
objExcelApp.Workbooks.Open("AAAA.xls")
Set objExcelBook = objExcelApp.ActiveWorkbook
Set objExcelSheets = objExcelBook.Worksheets
Set objExcelSheet = objExcelBook.Sheets(2)
objExcelSheet.Activate
objExcelApp.Application.Visible = True
End Sub

I got some problem that when other user click to get a excel file they will
get a error that "AAAA.xls could not be found" Pls let me know how do i do
about the storage of this file. Thank in advance
 
Your Workbooks.Open statement should include the full path to the worksheet file, not just the filename.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top