I have a visual basic module within Access that seems to compile fine; when I select the Debug function in the visual basic editor, I receive no errors or messages. However, within my Access form, when I try to click the button associated with this module, I receive the error message, "Automation Error. Invalid Advise Tags"
I have tried to google this error message and get no results. Neither do I get acceptable results for "advise tags", "invalid tags visual basic", or "invalid tags vb." Has anyone gotten this error before, and do you know what it means? Can anyone explain what an "advise tag" is?
FYI the button is supposed to open Word and a particular Word document. The coding is below:
Option Compare Database Option Explicit Private Declare Function SetCurrentDirectoryA Lib _ "kernel32" (ByVal lpPathName As String) As Long
Sub ChDirNet(szPath As String) Dim lReturn As Long lReturn = SetCurrentDirectoryA(szPath) If lReturn = 0 Then Err.Raise vbObjectError + 1, "Error setting path." End Sub
Private Sub close_form_Click() On Error GoTo Err_close_form_Click
If Me.Dirty Then Me.Dirty = False DoCmd.Close
Exit_close_form_Click: Exit Sub
Err_close_form_Click: MsgBox Err.Description Resume Exit_close_form_Click End Sub
Private Sub open_word_file_Click() On Error GoTo Err_open_word_file_Click
Dim retVal As Variant DoCmd.SetWarnings False ChDirNet "\BasenetworkserverceoSecurity" retVal = Shell("C:Program FilesMicrosoft OfficeOffice12WINWORD.EXE & ""Y:SecuritySecurityMemo.doc""", vbNormalFocus)
Exit_open_word_file_Click: Exit Sub
Err_open_word_file_Click: MsgBox Err.Description Resume Exit_open_word_file_Click End Sub
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!