Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Problems running a sub having arguments

From the Immediate window, this statement:

Application.Run "BofQUtilities.xla!InDirect_Menu_Routines.Test 1"

results in the following macro successfully running:

Sub Test1()
MsgBox ("Success")
End Sub

but this statement:

Application.Run _

"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages(myCell, ws,
£Col)"

results in an error message, saying the macro cannot be found.

The macro exists, and I'm fairly sure there are no typos.

Any ideas please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Problems running a sub having arguments

Stuart,

Haven't tried it myself, but try

Application.Run _
("BofQUtilities.xla!InDirect_Menu_Routines.ReNumbe rBofQPages", myCell, ws,
£Col)


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
From the Immediate window, this statement:

Application.Run "BofQUtilities.xla!InDirect_Menu_Routines.Test 1"

results in the following macro successfully running:

Sub Test1()
MsgBox ("Success")
End Sub

but this statement:

Application.Run _

"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages(myCell, ws,
£Col)"

results in an error message, saying the macro cannot be found.

The macro exists, and I'm fairly sure there are no typos.

Any ideas please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Problems running a sub having arguments

Thanks, but now a compile error ..."expected expression".

"Bob Phillips" wrote in message
...
Stuart,

Haven't tried it myself, but try

Application.Run _
("BofQUtilities.xla!InDirect_Menu_Routines.ReNumbe rBofQPages", myCell, ws,
£Col)


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Stuart" wrote in message
...
From the Immediate window, this statement:

Application.Run "BofQUtilities.xla!InDirect_Menu_Routines.Test 1"

results in the following macro successfully running:

Sub Test1()
MsgBox ("Success")
End Sub

but this statement:

Application.Run _

"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages(myCell, ws,
£Col)"

results in an error message, saying the macro cannot be found.

The macro exists, and I'm fairly sure there are no typos.

Any ideas please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 07/10/2003


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Problems running a sub having arguments

Thanks, but same error msg 1004.
Macro cannot be found.

Regards.

"S?ren Remfeldt" wrote in message
om...
Hi Stuart!
Try this instead
Application.Run _
"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages myCell,

ws,£Col
without the"()".....
It might work!
;-) Søren Remfeldt

"Stuart" wrote in message

...
From the Immediate window, this statement:

Application.Run "BofQUtilities.xla!InDirect_Menu_Routines.Test 1"

results in the following macro successfully running:

Sub Test1()
MsgBox ("Success")
End Sub

but this statement:

Application.Run _

"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages(myCell, ws,
£Col)"

results in an error message, saying the macro cannot be found.

The macro exists, and I'm fairly sure there are no typos.

Any ideas please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 07/10/2003


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Problems running a sub having arguments

Without taking time to setup variables (I passed all strings), this worked ok:

Option Explicit
Sub testme()

Dim myCell As String
Dim ws As String
Dim myCol As String

myCell = "hi"
ws = "there"
myCol = "!"
Application.Run _
"book3.xla!InDirect_Menu_Routines.ReNumberBofQPage s", _
myCell, ws, myCol

End Sub

And the macro looked like:
Option Explicit
Sub ReNumberBofQPages(myCell As String, ws As String, myCol As String)
MsgBox myCell & "--" & ws & "--" & myCol
End Sub


Stuart wrote:

From the Immediate window, this statement:

Application.Run "BofQUtilities.xla!InDirect_Menu_Routines.Test 1"

results in the following macro successfully running:

Sub Test1()
MsgBox ("Success")
End Sub

but this statement:

Application.Run _

"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages(myCell, ws,
£Col)"

results in an error message, saying the macro cannot be found.

The macro exists, and I'm fairly sure there are no typos.

Any ideas please?

Regards.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Problems running a sub having arguments

The Run statement worked fine.

Many thanks.

Regards.

"Dave Peterson" wrote in message
...
Without taking time to setup variables (I passed all strings), this worked

ok:

Option Explicit
Sub testme()

Dim myCell As String
Dim ws As String
Dim myCol As String

myCell = "hi"
ws = "there"
myCol = "!"
Application.Run _
"book3.xla!InDirect_Menu_Routines.ReNumberBofQPage s", _
myCell, ws, myCol

End Sub

And the macro looked like:
Option Explicit
Sub ReNumberBofQPages(myCell As String, ws As String, myCol As String)
MsgBox myCell & "--" & ws & "--" & myCol
End Sub


Stuart wrote:

From the Immediate window, this statement:

Application.Run "BofQUtilities.xla!InDirect_Menu_Routines.Test 1"

results in the following macro successfully running:

Sub Test1()
MsgBox ("Success")
End Sub

but this statement:

Application.Run _

"BofQUtilities.xla!InDirect_Menu_Routines.ReNumber BofQPages(myCell, ws,
£Col)"

results in an error message, saying the macro cannot be found.

The macro exists, and I'm fairly sure there are no typos.

Any ideas please?

Regards.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003


--

Dave Peterson



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.524 / Virus Database: 321 - Release Date: 06/10/2003


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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Problems in running a macro in another workbook dhatul Excel Discussion (Misc queries) 3 January 20th 06 08:01 AM
Running XY chart labeller using a macro's parameters and arguments. Hari Prasadh Charts and Charting in Excel 1 July 12th 05 05:00 PM
Office Small Business ver. 2003 has problems running in XP pablo5551 Excel Discussion (Misc queries) 0 April 26th 05 02:14 AM
More UDF problems; some won't update, some won't stop running! Keith R[_3_] Excel Programming 0 August 1st 03 02:01 PM


All times are GMT +1. The time now is 12:57 PM.

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

About Us

"It's about Microsoft Excel"