Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Excel file from VB and open MACRO | Excel Discussion (Misc queries) | |||
Macro runs upon wkbk open, but no Workbook_Open or Auto_Open Macro | Excel Programming | |||
Open workbook macro- find correct month to open? | Excel Programming | |||
open up an excel program with an auto open macro | Excel Programming | |||
How do I get my personal macro worksheet to open whenever I open . | Excel Discussion (Misc queries) |