
Exchanging variable values between applications
Hi,
In Project you can save anything you want to any Excel cell. Any Excel VBA
macro can then read the cell. I recommend naming a cell in Excel, that way
if someone adds or removes a row or column, the macro continues to work. For
example if a cell is named FilePath, then in Project
xlApp.Range("FilePath")=PathNameVariable
In an Excel macro:
xlBooks.Open FileName:=Range("FilePath")
--
Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
add-ons
Rod Gill
Microsoft Project MVP
Visit www.projectlearning.com for customized Project and Office VBA macros
and Project companion software
Quote:
> G'day,
> I am using MS Project 98, Office 2000 and Windows 2000
> Professional.
> I have written a Project application that opens Excel and
> gets it to open a text file (downloaded from an SAP
> mainframe) and process the data before copying and pasting
> it back to Project.
> I want to assign a value to a variable in Project via an
> input box, then send that value to Excel. I want to use
> the value as part of the filename to be retrieved in Excel.
> When I assign a value to a variable in Project, how do I
> then refer to that variable (or retrieve its value) in
> Excel? Declaring a variable as Public makes it available
> in that project, but not in another application.
> Hoping someone can point me in the right direction.
> Thanks,
> Dave.