I am trying to convert a vbscript to VB.net. This is where I am currently, can someone help me convert this to vb.net?
The compile errors I get are:Code:Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Const FOF_CREATEPROGRESSDLG = &H0& Dim fName Dim objShell, objFolder As Object Dim TargetFolder As String Dim d As Date = Date.Today d = d.AddDays(-5) fName = Microsoft.VisualBasic.Right("00" & Month(d), 2) & "." & Microsoft.VisualBasic.Right("00" & Day(d), 2) & "." & Microsoft.VisualBasic.Right(Year(d), 2) & "_" TargetFolder = "N:\Daily Data\Production" objShell = CreateObject("Shell.Application") objFolder = objShell.NameSpace(TargetFolder) objFolder.MoveHere("Q:\Archive\\" & fName & "*", FOF_CREATEPROGRESSDLG) End Sub End Class
Day is a type and cannot be used in an expression




Reply With Quote