I need some one that is willing to go through my code and help me clean it up (e.g. Remove any unnecessary code, or simplify code when able.)
Printable View
I need some one that is willing to go through my code and help me clean it up (e.g. Remove any unnecessary code, or simplify code when able.)
So post the code!
Here ya go.
Had a quick look one thing i noticed was you have,
VB Code:
Public Function CheckPath(Path As String) As String Path = Trim$(Path) If Right$(Path, 1) = "\" Then CheckPath = Path Else CheckPath = Path & "\" End If End Function
VB Code:
Private Sub Form_Load() Set lnk = New cShellLinkA sAppPath = App.Path ' in case it's not a root directory If Right$(sAppPath, 1) <> "\" Then sAppPath = sAppPath & "\" End If Call ListFiles(CheckPath(App.Path) & "Skin\") End Sub
and,
VB Code:
Private Function NormalizePath(sFolder As String) As String sFolder = Trim$(sFolder) If Right$(sFolder, 1) <> "\" Then sFolder = sFolder & "\" End If NormalizePath = sFolder End Function
Only need one function there.