I'm creating a subroutine in Excel to run a macro in Access. I keep getting runtime error 2501: "RunMacro action was cancelled." Does anyone know what would cause this? It does prompt me to enter the password for the SQL Server login, which I do. Could that be the problem? I'd love to be able to put the password in the code so that the user doesn't have to enter it. Is that possible? Thank you!
Dim A As Object
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase ("C:\Radio Shack\RadioShack.accdb")