Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 2950 creating new directory

Status
Not open for further replies.

blacy

Technical User
Jun 17, 2000
16
After 2003 - 2007 office upgrade I have and event proceedure that creates a new directory on a drive. WHen running the code I get an error 2950. I have alread trusted the drive and subdirectories. I am not sure if this is a problem because I am acting outside of office environment with the action of creating a new directory or if there is another problem. Any help would be great..


Private Sub Combo80_AfterUpdate()
On Error GoTo Err_Combo80_AfterUpdate
Dim strServerPath As String
Dim strNewDirectoryName As String
Dim strNewFullPathName As String
Dim strQuoteFormsPathName As String
Dim strQuoteFormsFileName As String


strNewDirectoryName = Me![QuoteRef]
strServerPath = DLookup("QuoteFilePath", "ZZCompanyInfoTable1", "CompanyID= " & 1)

strNewFullPathName = strServerPath & strNewDirectoryName

strQuoteFormsPathName = DLookup("QuoteFormsPath", "ZZCompanyInfoTable1", "CompanyID= " & 1)

strQuoteFormsFileName = "PanelmaticQuote1.xls"

DoCmd.RunMacro "Quote Form Macros.Set Company"

MkDir strNewFullPathName
Me.QuoteFilePath = strNewFullPathName


Dim fs As Object
Set fs = CreateObject("scripting.filesystemobject")
If fs.FileExists(strQuoteFormsPathName & strQuoteFormsFileName) Then
fs.CopyFile strQuoteFormsPathName & strQuoteFormsFileName, strNewFullPathName & "\" & strNewDirectoryName & ".xls", True
End If
Set fs = Nothing
Me.Refresh

Exit_Combo80_AfterUpdate:
Exit Sub

Err_Combo80_AfterUpdate:
MsgBox "Directory already exist"

End Sub
 
I have discovered that it is not a problem with the code. The issue is the security code. I have done everything including creating and authorizing a security certificate on the frontend and backend database. Still when I open the macro in design view most of the items are flagged with a message that says that the action will not be allowed to operate due to not having a security certificate.

I dont know if you can help but this security does not seem to be working at all. Neither of the methods described by MS have worked and I believe I have followed the instructions..
 



Check in Excel...

Office Button > Excel Options > Trust Center > Trust center settings...



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top