View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
[email protected] cashwath28@gmail.com is offline
external usenet poster
 
Posts: 1
Default Macro for updating the filename along with data

Hi Gaura215,

The below piece of command may be solve your problem

dim i as double, wks as worksheet
i = wks.Cells(Rows.Count, "b").End(xlUp).Row
wks.Range("a1:a" & i).Value = Application.ActiveWorkbook.Path & "\" & ActiveWorkbook.Name