Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro with formula??? 2

Status
Not open for further replies.

Tuff

Instructor
Mar 17, 2003
19
AU
Hi Guys,

Just wondering if it is possible to link a macro to a cell value within a spreasheet.

ie change the following:
"\\finance\group\Accounts\TH\Uploads\MUP\2003-04\Nov03\M03105.xls"

To say something like this??
"\\finance\group\Accounts\TH\Uploads\MUP\2003-04\Nov03\="b5".xls"

Changing the final file name to a formula??
 
Yes.

use

filenam = Range("B5").Value
"\\finance\group\Accounts\TH\Uploads\MUP\2003-04\Nov03\" & filnam & ".xls"

That will add in the value of B5 to the filename in the place you wanted it

dyarwood

 
Hi Tuff,

You can refer directly to the cell like this ..

Code:
 "\\finance\group\Accounts\TH\Uploads\MUP\2003-04\Nov03\" & [b5] & ".xls"

Enjoy,
Tony
 
Thanks heaps guys.

Much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top