Thread: Run time error 3011
02-17-16, 14:31 #1Registered User
- Join Date
- May 2014
Unanswered: Run time error 3011
I am trying to add run the
Private Sub Command40_Click()
Dim oExcel As New Excel.Application
Dim oWb As Excel.Workbook
Dim oSheet As Excel.Worksheet
Dim fileName As String
oExcel.Workbooks.Open (CurrentProject.Path & "\" & "TrainingPlanExcel.xlsX")
oExcel.Visible = True
Set oWb = oExcel.Workbooks(1)
Set oSheet = oExcel.ActiveWorkbook.Worksheets("sheet1")
Set dbMyDatabase = CurrentDb()
oSheet.Cells(3, 3) = Forms!employeepillarteamskillsselect!DeptName
fileName = "F:\Training-F620\New Folder\R Database\TrainingPlanExcel.xlsX"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "CLASSTYPE", fileName, True, ""
Set oSheet = Nothing
Set oWb = Nothing
Set oExcel = Nothing
End Subon shared network drive. I keep on getting error 3011. I don't know why. It's exporting the query fine in C drive (local drive).
02-17-16, 15:16 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
So which line do you get the error
What is the error message?
It could be anything
It could be permissions yoy dont have the required righrs to do something
It could be relative paths. Does f drive exist on the faulting machine.
Does the relative path in f drive exist. On networked multi user applications refer to server shares as opposed to drive letters, unless you know tge drive letter exists on all machines
Wrap such code ibside an error handler that caters for missing disk resources
Is the Excel current triaing plan in the current projectI'd rather be riding on the Tiger 800 or the Norton