#1   Report Post  
Posted to microsoft.public.excel.misc
CWillis
 
Posts: n/a
Default Best Practice

I have a macro that loads data from another workbook when a button is pushed.
Currently it only pulls data in from one cell using the following lines of
code:

With Sheet23.Range("A1")
.Formula = "= '" & module1location & "sheet2'!A3"
.Formula = .Value
End With

Shortly, I am going to be pulling in a lot more data from different cells
from "module1location". Is this the best way to be doing this? Seems like I
remember someone saying "don't fix what ain't broke..."

Thanks for any help,
Chris
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Rech
 
Posts: n/a
Default Best Practice

There are at least 3 ways to get information from one workbook into another.
One is to open the workbook and do a copy/paste. Another is to create
linking formulas (your technique) which works with an open or closed source
workbook. A third is to use ADO if the source data is arranged in a table.
Since my 'best practice' is to waste as little of the user's time as
possible, I'd use the technique that is the quickest in a realistic test.
You'd have to run some time trials to determine that.

--
Jim
"CWillis" wrote in message
...
|I have a macro that loads data from another workbook when a button is
pushed.
| Currently it only pulls data in from one cell using the following lines of
| code:
|
| With Sheet23.Range("A1")
| .Formula = "= '" & module1location & "sheet2'!A3"
| .Formula = .Value
| End With
|
| Shortly, I am going to be pulling in a lot more data from different cells
| from "module1location". Is this the best way to be doing this? Seems
like I
| remember someone saying "don't fix what ain't broke..."
|
| Thanks for any help,
| Chris


  #3   Report Post  
Posted to microsoft.public.excel.misc
CWillis
 
Posts: n/a
Default Best Practice

Thanks Jim. My data is just spread out in different cells so I don't think
ADO is the best way to go. I also don't want to open the workbook, so looks
like i'm sticking with my way. Thanks again.

"Jim Rech" wrote:

There are at least 3 ways to get information from one workbook into another.
One is to open the workbook and do a copy/paste. Another is to create
linking formulas (your technique) which works with an open or closed source
workbook. A third is to use ADO if the source data is arranged in a table.
Since my 'best practice' is to waste as little of the user's time as
possible, I'd use the technique that is the quickest in a realistic test.
You'd have to run some time trials to determine that.

--
Jim
"CWillis" wrote in message
...
|I have a macro that loads data from another workbook when a button is
pushed.
| Currently it only pulls data in from one cell using the following lines of
| code:
|
| With Sheet23.Range("A1")
| .Formula = "= '" & module1location & "sheet2'!A3"
| .Formula = .Value
| End With
|
| Shortly, I am going to be pulling in a lot more data from different cells
| from "module1location". Is this the best way to be doing this? Seems
like I
| remember someone saying "don't fix what ain't broke..."
|
| Thanks for any help,
| Chris



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
help panel won't go away after saving a practice sheet bernie b. New Users to Excel 0 May 3rd 06 08:29 PM
Question re best practice anny Excel Worksheet Functions 2 March 25th 06 07:14 PM
Excel - how can I practice formulas on financial questions? flamingformulas Excel Discussion (Misc queries) 4 February 20th 06 03:18 PM
Excel practice sheet. Can't view instructions. Lindyloo Excel Discussion (Misc queries) 0 February 5th 06 07:21 PM
best practice? hsibbs Excel Discussion (Misc queries) 7 June 17th 05 04:11 AM


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