I have a function to rename a macro in remote database.Is it possible to use this function also to delete the table calls and the form frmCalls in the remote database ?
Public Function RenameMacro()
Dim strPassword As String
Dim strDatabase As String
Dim app As New Access.Application
Dim dbs As DAO.Database
On Error GoTo ErrHandler
strDatabase = "c:benew.mdb"
strPassword = "Secret"
Set dbs = app.DBEngine.OpenDatabase(strDatabase, , , ";PWD=" & strPassword)
app.OpenCurrentDatabase strDatabase
app.DoCmd.Rename "Macro2", acMacro, "Macro1"
ExitHandler:
On Error Resume Next
dbs.Close
Set dbs = Nothing
app.Quit
Set app = Nothing
Exit Function
ErrHandler:
MsgBox Err.Description, vbExclamation
Resume ExitHandler
End Function



