View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
yogendra joshi yogendra joshi is offline
external usenet poster
 
Posts: 48
Default Move them to different folder

Sub move()
Dim path As String
Dim fil_nam As String

path = "D:/" ' Specify Path you want to move to, you can also do this by
'passing a vairable
fil_nam = ActiveWorkbook.Name
del_file = ActiveWorkbook.FullName

ActiveWorkbook.SaveAs (path & fil_nam)
Kill ActiveWorkbook.Name
End Sub


Prasad Vanka wrote:

Hi,

Is there any way, using Excel VBA code, we can move a worksheet from
one folder on the system to another. Can someone give me an example
code.

Thanks in advance
Prasad Vanka