Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Open wb from a wb and run a macro

This is hard top describe in a a title.
I would like to be working in one workbook (wb) select a cell that has any
type of data and search for that data in another wb that may or may not be
open.

I am mainly stumbling due to Excel 2007 which seems to have some quirks for
me to work thru :lol:

As always, any help is appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default Open wb from a wb and run a macro

Sub check()
Application.Run ("Workbookname.xls!Macroname")
End Sub


"Rick S." skrev:

This is hard top describe in a a title.
I would like to be working in one workbook (wb) select a cell that has any
type of data and search for that data in another wb that may or may not be
open.

I am mainly stumbling due to Excel 2007 which seems to have some quirks for
me to work thru :lol:

As always, any help is appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Open wb from a wb and run a macro

So simple yet so simple! :lol:

Thank you!
:beer:

"excelent" wrote:

Sub check()
Application.Run ("Workbookname.xls!Macroname")
End Sub


"Rick S." skrev:

This is hard top describe in a a title.
I would like to be working in one workbook (wb) select a cell that has any
type of data and search for that data in another wb that may or may not be
open.

I am mainly stumbling due to Excel 2007 which seems to have some quirks for
me to work thru :lol:

As always, any help is appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Open wb from a wb and run a macro

Do you know why it keeps telling me that the macro cannot be found when the
workbook name has a space in it?

"excelent" wrote:

Sub check()
Application.Run ("Workbookname.xls!Macroname")
End Sub


"Rick S." skrev:

This is hard top describe in a a title.
I would like to be working in one workbook (wb) select a cell that has any
type of data and search for that data in another wb that may or may not be
open.

I am mainly stumbling due to Excel 2007 which seems to have some quirks for
me to work thru :lol:

As always, any help is appreciated!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Open wb from a wb and run a macro

This issue as far as I'm concerned goes all the way back to Excel 97 at
least when VBA was first introduced to Excel. We use a vendor for pulling
data from our database system and take the data into Excel. With me being
one of 2 far advanced MS Office users and VBA programmers within the
division, I not only link the queries to Excel via the third party tool, but
also use the various events setup in it. Anyhow, the vendor has specified
that for any workbook with queries linked to it, The workbook name can not
have a single space in it. However, you can use the underscore (_) in place
of the space to get around this issue.

When I am linking a procedure to an event of the vendor, it has to be in the
format of:

WorkbookName.xls!ModuleName.ProcedureName

When you think about it, can any module and/or procedure name have a single
space in it?

Obviously no as spaces have a lot of other significations in the coding
world. For this reason, I can see why spaces don't work as it would be the
same as if you would be attempting to use the function of CallByName, and
it's procname argument can't contain any spaces in it either (True, the help
file doesn't state that, but have you ever seen a procedure or object name
contain a space within it's code name?) In this case, it's using the
workbook name as if it's a code name for the workbook.

--
Thanks,

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
"Jordan" wrote in message
...
Do you know why it keeps telling me that the macro cannot be found when
the
workbook name has a space in it?

"excelent" wrote:

Sub check()
Application.Run ("Workbookname.xls!Macroname")
End Sub


"Rick S." skrev:

This is hard top describe in a a title.
I would like to be working in one workbook (wb) select a cell that has
any
type of data and search for that data in another wb that may or may not
be
open.

I am mainly stumbling due to Excel 2007 which seems to have some quirks
for
me to work thru :lol:

As always, any help is appreciated!



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
Open Excel file from VB and open MACRO no1jimmyman Excel Discussion (Misc queries) 0 February 14th 11 10:10 PM
Macro runs upon wkbk open, but no Workbook_Open or Auto_Open Macro Ron Coderre Excel Programming 2 September 26th 06 05:50 PM
Open workbook macro- find correct month to open? buzzharley[_10_] Excel Programming 8 July 8th 06 04:30 AM
open up an excel program with an auto open macro [email protected] Excel Programming 2 July 17th 05 04:48 PM
How do I get my personal macro worksheet to open whenever I open . Claudia_R Excel Discussion (Misc queries) 3 December 9th 04 11:59 PM


All times are GMT +1. The time now is 11:20 PM.

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"