Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
add data to a closed workbook Spencer Hutton Excel Programming 2 April 9th 05 07:16 PM
PUT data in closed workbook Max Potters Excel Programming 5 August 18th 04 01:33 PM
getting data from closed workbook onedaywhen Excel Programming 0 April 2nd 04 09:10 AM
getting data from closed workbook onedaywhen Excel Programming 0 April 2nd 04 09:08 AM
getting data from closed workbook John Williams[_4_] Excel Programming 0 April 1st 04 09:08 PM


All times are GMT +1. The time now is 05:58 AM.

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"