View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ina ina is offline
external usenet poster
 
Posts: 120
Default call a macro from macro

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