call a macro from macro

I

ina

I have this connection

Sub GetconnectionADOBD()

Dim cnx As ADODB.Connection
Set cnx = New ADODB.Connection

cnx.ConnectionString = c
cnx.Open

If cnx.State = adStateOpen Then
End If


Application.Run "mymacro,(cnx)"

End Sub

and this macro has this as argument

Sub mymacro (ByVal cnx As ADODB.Connection) ...

end sub


I have a mistake in application.run and I do not understand why, how
can I call macro from macro.

Ina
 
B

Bob Phillips

Why not just use

mymacro cnx


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top