Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Call procedure using Application.Run

I am trying to call a procedure in another workbook. I first tried to set up
a reference to use in the code, but got some error related to the reference
name that wouldn't allow it. So I'm trying what seems to be the better way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Call procedure using Application.Run

Try changing the project name from VBAProject (for Doc check.xls) to something
nice and unique: DocCheck

Then try the reference.

Or

Application.Run "'Doc Check.xls'!update_status"

xlcharlie wrote:

I am trying to call a procedure in another workbook. I first tried to set up
a reference to use in the code, but got some error related to the reference
name that wouldn't allow it. So I'm trying what seems to be the better way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Call procedure using Application.Run

Application.Run "'Doc Check.xls'!update_status"


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"xlcharlie" wrote in message
...
I am trying to call a procedure in another workbook. I first tried to set

up
a reference to use in the code, but got some error related to the

reference
name that wouldn't allow it. So I'm trying what seems to be the better

way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Call procedure using Application.Run

Thanks Dave. The space was in the file name when I inheritted it so I didn't
want to rename the file, then have to modify any/all references to it. I am
assuming, though, that to change the project name I would have change the
file name. Is there another way to change the project name? Regardless,
from your response and Bob's it seems I may have just been missing an
apostrophes ( ' ). Time to get some glasses.

Thanks!

"Dave Peterson" wrote:

Try changing the project name from VBAProject (for Doc check.xls) to something
nice and unique: DocCheck

Then try the reference.

Or

Application.Run "'Doc Check.xls'!update_status"

xlcharlie wrote:

I am trying to call a procedure in another workbook. I first tried to set up
a reference to use in the code, but got some error related to the reference
name that wouldn't allow it. So I'm trying what seems to be the better way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Call procedure using Application.Run

Nevermind that last question. It's pretty straight forward in the Help file.
Just never had a reason to rename a project before.

Thanks again.

"Dave Peterson" wrote:

Try changing the project name from VBAProject (for Doc check.xls) to something
nice and unique: DocCheck

Then try the reference.

Or

Application.Run "'Doc Check.xls'!update_status"

xlcharlie wrote:

I am trying to call a procedure in another workbook. I first tried to set up
a reference to use in the code, but got some error related to the reference
name that wouldn't allow it. So I'm trying what seems to be the better way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Call procedure using Application.Run

Thanks Bob.

"Bob Phillips" wrote:

Application.Run "'Doc Check.xls'!update_status"


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"xlcharlie" wrote in message
...
I am trying to call a procedure in another workbook. I first tried to set

up
a reference to use in the code, but got some error related to the

reference
name that wouldn't allow it. So I'm trying what seems to be the better

way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Call procedure using Application.Run

The project name isn't the same as the workbook name. In fact, I bet the
current project name is VBAProject--that's the default for all projects.



xlcharlie wrote:

Thanks Dave. The space was in the file name when I inheritted it so I didn't
want to rename the file, then have to modify any/all references to it. I am
assuming, though, that to change the project name I would have change the
file name. Is there another way to change the project name? Regardless,
from your response and Bob's it seems I may have just been missing an
apostrophes ( ' ). Time to get some glasses.

Thanks!

"Dave Peterson" wrote:

Try changing the project name from VBAProject (for Doc check.xls) to something
nice and unique: DocCheck

Then try the reference.

Or

Application.Run "'Doc Check.xls'!update_status"

xlcharlie wrote:

I am trying to call a procedure in another workbook. I first tried to set up
a reference to use in the code, but got some error related to the reference
name that wouldn't allow it. So I'm trying what seems to be the better way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.


--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Call procedure using Application.Run

Ignore my last response <vbg.

xlcharlie wrote:

Nevermind that last question. It's pretty straight forward in the Help file.
Just never had a reason to rename a project before.

Thanks again.

"Dave Peterson" wrote:

Try changing the project name from VBAProject (for Doc check.xls) to something
nice and unique: DocCheck

Then try the reference.

Or

Application.Run "'Doc Check.xls'!update_status"

xlcharlie wrote:

I am trying to call a procedure in another workbook. I first tried to set up
a reference to use in the code, but got some error related to the reference
name that wouldn't allow it. So I'm trying what seems to be the better way.

Application.Run "Doc Check.xls!update_status"

But it says the macro 'Doc Check.xls!update_status' cannot be found
(Run-time error 1004). Is there something I'm getting wrong in my syntax?
Should I declare the Module? I'm running Excel 2000 with VB 6.0.

Thanks in advance for passing on your insight.


--

Dave Peterson


--

Dave Peterson
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
Call Procedure Ronbo Excel Programming 4 February 23rd 05 08:11 PM
Where else to look for procedure call Lulu Excel Programming 0 November 24th 04 03:07 PM
Where else to look for procedure call Lulu Excel Programming 2 November 24th 04 02:14 AM
call procedure bob Excel Programming 1 August 9th 03 12:40 AM
procedure won't call John Gittins Excel Programming 0 August 5th 03 08:17 PM


All times are GMT +1. The time now is 10:26 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"