Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David P.
 
Posts: n/a
Default Cells to link to "current workbook"

I have a spreadsheet that contains pricing that is calculated by referencing
cells in various other workbooks saved under customer names (not at the same
time).

I need to create a macro that will allow me to easily link my pricing
workbook to my customer workbooks. Any macro that I have tried to create to
accomplish that limits itself to the workbook I pointed it to while creating
it.

Is there a way to write the code that can be flexible to reference any
workbook and not specifically the workbook it originally referenced?

Hope that made sense. I'm stuck. I've tried all kinds of tricks. Thank you.
--
David P.
  #2   Report Post  
paul
 
Posts: n/a
Default

you dont need a macro,in the cell you want the link to exist in type =and
then click in the cell in the workbook you want to link to.ie the workbook
that you want to link to has to be open at the time you create the
link,unless you know the name of the workbook and the cell reference you want
to link to you just type ='C:\Documents and Settings\John Smith\My
Documents\[book1.xls]Sheet1'!$O$4 or similar
--
paul
remove nospam for email addy!



"David P." wrote:

I have a spreadsheet that contains pricing that is calculated by referencing
cells in various other workbooks saved under customer names (not at the same
time).

I need to create a macro that will allow me to easily link my pricing
workbook to my customer workbooks. Any macro that I have tried to create to
accomplish that limits itself to the workbook I pointed it to while creating
it.

Is there a way to write the code that can be flexible to reference any
workbook and not specifically the workbook it originally referenced?

Hope that made sense. I'm stuck. I've tried all kinds of tricks. Thank you.
--
David P.

  #3   Report Post  
dominicb
 
Posts: n/a
Default


Good morning David

Try saving your macro as an add-in, and don't reference it to a
particular workbook by name, but use the ActiveWorkbook instruction,
which will just use the file you are working on.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=378267

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
Updating linked cells within a workbook, from worksheet to workshe notloiseweiss Excel Discussion (Misc queries) 7 February 18th 08 01:15 AM
How do I link data from another workbook using a different file na Victor Excel Discussion (Misc queries) 1 May 29th 05 08:57 PM
how do i add the same text after current text in multiple cells Sue Excel Discussion (Misc queries) 3 January 13th 05 09:28 PM
i made change in a current workbook and accidentally save it, can. angel Excel Discussion (Misc queries) 1 January 4th 05 01:11 AM
Can't link cells in worksheets in same workbook Hume Waring New Users to Excel 1 December 22nd 04 09:13 PM


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