Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting data from a closed workbook
Hi,
I've seen all the threads regarding the topic, but all these macros/codes copy the data from a closed workbook to the active workbook. I want a macro with following features 1. I do not want to copy the data, instead I want to load an array with the data from a closed workbook 2. I do not know the amount of data in the closed workbook 3. Macro should run irrespective of whether the workbook is open or closed 4. Macro should be stored outside the workbook so that all the users in the network should be able to use it please, help me out of the situation. Thanks a ton -- Baapi |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting data from a closed workbook
Use ADO.
Macros are stored in workbooks. You can choose which one, but to run a macro, the workbook containing the macro must be open. It could be opened read only. http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Baapi" wrote: Hi, I've seen all the threads regarding the topic, but all these macros/codes copy the data from a closed workbook to the active workbook. I want a macro with following features 1. I do not want to copy the data, instead I want to load an array with the data from a closed workbook 2. I do not know the amount of data in the closed workbook 3. Macro should run irrespective of whether the workbook is open or closed 4. Macro should be stored outside the workbook so that all the users in the network should be able to use it please, help me out of the situation. Thanks a ton -- Baapi |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting data from a closed workbook
Tom,
The code looks like that it copies a known range of data from closed workbook. What I'm looking for is to compare the data from a closed workbook with the data in the activesheet and highlight the cells with matching values. I do not want to copy the data onto my excel sheet The closed workbook will be maintained by me (add/delete etc.. everyday) and my team members will run macros on their machines to highlight data in their workbooks. Will your earlier answer suffice my requirements? Thanks, -- Baapi "Tom Ogilvy" wrote: Use ADO. Macros are stored in workbooks. You can choose which one, but to run a macro, the workbook containing the macro must be open. It could be opened read only. http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Baapi" wrote: Hi, I've seen all the threads regarding the topic, but all these macros/codes copy the data from a closed workbook to the active workbook. I want a macro with following features 1. I do not want to copy the data, instead I want to load an array with the data from a closed workbook 2. I do not know the amount of data in the closed workbook 3. Macro should run irrespective of whether the workbook is open or closed 4. Macro should be stored outside the workbook so that all the users in the network should be able to use it please, help me out of the situation. Thanks a ton -- Baapi |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting data from a closed workbook
and another thing...
will using ADO mean that all my team should have ActiveX loaded/enabled in their system? if yes, it is going to be a problem as all my team do not have that previlage. is there any other method? Thanks, -- Baapi "Tom Ogilvy" wrote: Use ADO. Macros are stored in workbooks. You can choose which one, but to run a macro, the workbook containing the macro must be open. It could be opened read only. http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Baapi" wrote: Hi, I've seen all the threads regarding the topic, but all these macros/codes copy the data from a closed workbook to the active workbook. I want a macro with following features 1. I do not want to copy the data, instead I want to load an array with the data from a closed workbook 2. I do not know the amount of data in the closed workbook 3. Macro should run irrespective of whether the workbook is open or closed 4. Macro should be stored outside the workbook so that all the users in the network should be able to use it please, help me out of the situation. Thanks a ton -- Baapi |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting data from a closed workbook
Before it is placed in the workbook, it is in a record set. You might have
to do a little of your own code writing. Use that as an example. I don't think you need ActiveX enabled. -- Regards, Tom Ogilvy "Baapi" wrote in message ... Tom, The code looks like that it copies a known range of data from closed workbook. What I'm looking for is to compare the data from a closed workbook with the data in the activesheet and highlight the cells with matching values. I do not want to copy the data onto my excel sheet The closed workbook will be maintained by me (add/delete etc.. everyday) and my team members will run macros on their machines to highlight data in their workbooks. Will your earlier answer suffice my requirements? Thanks, -- Baapi "Tom Ogilvy" wrote: Use ADO. Macros are stored in workbooks. You can choose which one, but to run a macro, the workbook containing the macro must be open. It could be opened read only. http://www.erlandsendata.no/english/...php?t=envbadac -- Regards, Tom Ogilvy "Baapi" wrote: Hi, I've seen all the threads regarding the topic, but all these macros/codes copy the data from a closed workbook to the active workbook. I want a macro with following features 1. I do not want to copy the data, instead I want to load an array with the data from a closed workbook 2. I do not know the amount of data in the closed workbook 3. Macro should run irrespective of whether the workbook is open or closed 4. Macro should be stored outside the workbook so that all the users in the network should be able to use it please, help me out of the situation. Thanks a ton -- Baapi |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting data from a closed workbook
This is my suggestion: Use *ExecuteExcel4Macro(string)* I want a macro with following features 1. I do not want to copy the data, instead I want to load an array with the data from a closed workbook - ExecuteExcel4Macro(string) read the value of the cell written in the string 2. I do not know the amount of data in the closed workbook - use for..next or for..each method to read all the cells you need 3. Macro should run irrespective of whether the workbook is open or closed - the string could be the cell reference of a closed workbook. 4. Macro should be stored outside the workbook so that all the users in the network should be able to use it - you can put it in a addin's. Hope this can help you Massimo Pulidori -- Masimax ------------------------------------------------------------------------ Masimax's Profile: http://www.excelforum.com/member.php...o&userid=33345 View this thread: http://www.excelforum.com/showthread...hreadid=531608 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add data to a closed workbook | Excel Programming | |||
PUT data in closed workbook | Excel Programming | |||
getting data from closed workbook | Excel Programming | |||
getting data from closed workbook | Excel Programming | |||
getting data from closed workbook | Excel Programming |