View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_4_] Jim Thomlinson[_4_] is offline
external usenet poster
 
Posts: 1,119
Default refering to cell data within a macro

try something like...

Windows(sheets("Sheet Name").Range("A1").Value & ".xls").activate

--
HTH...

Jim Thomlinson


"DarrenWood" wrote:


Within my spreadsheet i have say cell A1 containing a name, lets say
fredbloggs.

I then have a macro which contains the line

Windows("fredbloggs.xls").activate

because there is also a sheet in that same name.

Instead of the macro line saying "fredbloggs.xls" is there any way of
putting the cell reference of 'A1' within the macro line ?

So in essence the window that will be opened will be the one named in
cell A1 on the spreadsheet ?

Your comments are greatly valued

Thank you

Darren


--
DarrenWood
------------------------------------------------------------------------
DarrenWood's Profile: http://www.excelforum.com/member.php...o&userid=16460
View this thread: http://www.excelforum.com/showthread...hreadid=383322