Using Cell Contents to change Path


Posted by Leigh Hall on December 04, 2001 10:07 AM

Is it possible to use the contents of a cell say A1 to determine a path.

For example cell A1 contains the word January.
The macro currently reads path = "C:\leigh\private\month". How do I substitute month for the contents of A1?

TIA

Leigh



Posted by Damon Ostrander on December 04, 2001 1:35 PM

Hi Leigh,

Yes, it is just:

path = "C:\leigh\private\" & Worksheets("Sheet1").[A1]

or if sheet containing A1 is the active sheet then

path = "C:\leigh\private\" & [A1]

Happy computing.

Damon