Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default call a macro from macro

Why not just use

mymacro cnx


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ina" wrote in message
oups.com...
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



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

Thanks :)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
Excel Macro call Word Macro with Parameters Bill Sturdevant[_2_] Excel Programming 9 May 24th 07 12:21 AM
macro call Steve Excel Discussion (Misc queries) 12 August 25th 06 04:27 AM
Macro to call a file that has a auto open macro in the file itself [email protected] Excel Programming 1 August 5th 05 06:39 AM


All times are GMT +1. The time now is 04:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"