Code:Private Sub CreateFolder() Dim xlSheet As Object = CType(xlApp.Worksheets("Form"), Excel.Worksheet) Dim YourPath As String = IO.Path.Combine("\\frtstpr-dna203a\tou5\Example_Design\11_SSBD\01_SSBD_Lcl_ad_open\Improvements\" + xlSheet.cells(6, 2).value.ToString + xlSheet.cells(6, 3).value.ToString + xlSheet.cells(6, 4).value.ToString) Try If (Not System.IO.Directory.Exists(YourPath)) Then System.IO.Directory.CreateDirectory(YourPath) End If messagebox.show(YourPath & ".xlsm") '<--- new! what is the path that is shown? maybe not what you expect? post the result. My.Computer.FileSystem.CopyFile( _ "\\frtstpr-dna203a\tou5\Example_Design\01_SSBD\01_SSBD_Lcl_ad_open\Improvements\TR tracker\TR_Template_Draft_01.xlsm", _ YourPath & ".xlsm", overwrite:=False) Catch ex As Exception MsgBox(ex.Message) End Try End Sub




Reply With Quote
