View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Enter File name in cell

Workbooks.Open Filename:= _
"C:\Users\OssieMac\Documents\Excel\Test Macros\ABC.xls"

ActiveWorkbook.Sheets("Sheet1").Range("F2") = ThisWorkbook.Name

--
Regards,

OssieMac


"Kashyap" wrote:

I have a macro to open a file and I want to enter the file name from which
macro is run to a cell in opened file.

If I open abc.xls from file xyz.xls, then I want value of cell F2 in abc.xls
to be xyz